From beec825b401834ba05d3159166704b826567bc77 Mon Sep 17 00:00:00 2001 From: Raymond Lee Date: Fri, 26 Apr 2013 10:09:52 +0800 Subject: [PATCH] Bug 865643 - Fix DEPRECATION WARNING: archiveBookmarksFile is deprecated error. r=rnewman --- services/sync/modules/engines/bookmarks.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/sync/modules/engines/bookmarks.js b/services/sync/modules/engines/bookmarks.js index ac5b6b0b7e3e..7ef86cc73461 100644 --- a/services/sync/modules/engines/bookmarks.js +++ b/services/sync/modules/engines/bookmarks.js @@ -18,6 +18,7 @@ Cu.import("resource://services-sync/engines.js"); Cu.import("resource://services-sync/record.js"); Cu.import("resource://services-sync/util.js"); Cu.import("resource://gre/modules/Task.jsm"); +Cu.import("resource://gre/modules/PlacesBackups.jsm"); const ALLBOOKMARKS_ANNO = "AllBookmarks"; const DESCRIPTION_ANNO = "bookmarkProperties/description"; @@ -348,7 +349,7 @@ BookmarksEngine.prototype = { Task.spawn(function() { // For first-syncs, make a backup for the user to restore if (this.lastSync == 0) { - yield PlacesUtils.archiveBookmarksFile(null, true); + yield PlacesBackups.create(null, true); } this.__defineGetter__("_guidMap", function() { @@ -1280,7 +1281,7 @@ BookmarksStore.prototype = { let cb = Async.makeSpinningCallback(); Task.spawn(function() { // Save a backup before clearing out all bookmarks. - yield PlacesUtils.archiveBookmarksFile(null, true); + yield PlacesBackups.create(null, true); for each (let guid in kSpecialIds.guids) if (guid != "places") { let id = kSpecialIds.specialIdForGUID(guid);