mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1221050 - part 4: write a backup to desktop, r=ttaubert
--HG-- extra : commitid : F8n6To0pgLb extra : rebase_source : bf747527cbff79efc53d758ed453a122f5005aaf
This commit is contained in:
parent
32e0a1a6b1
commit
c3904f5023
@ -13,6 +13,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown", "resource://gre/modules/AsyncShutdown.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
|
||||
@ -128,7 +129,11 @@ this.TabGroupsMigrator = {
|
||||
},
|
||||
|
||||
_createBackup(stateStr) {
|
||||
// TODO
|
||||
let dest = Services.dirsvc.get("Desk", Ci.nsIFile);
|
||||
dest.append("Firefox-tabgroups-backup.json");
|
||||
let promise = OS.File.writeAtomic(dest.path, stateStr, {encoding: "utf-8"});
|
||||
AsyncShutdown.webWorkersShutdown.addBlocker("TabGroupsMigrator", promise);
|
||||
return promise;
|
||||
},
|
||||
|
||||
_bookmarkAllGroupsFromState: Task.async(function*(groupData) {
|
||||
|
Loading…
Reference in New Issue
Block a user