mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Bug 865643 - Fix DEPRECATION WARNING: archiveBookmarksFile is deprecated error. r=rnewman
This commit is contained in:
parent
ecdf115619
commit
beec825b40
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user