Bug 1312406 and
bug 1255361 - part 2: remove tab groups backup, r?dolske
MozReview-Commit-ID: 96AFjsXE1w0
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1768,17 +1768,17 @@ BrowserGlue.prototype = {
if (topic != "alertclickcallback")
return;
this._openPreferences("sync");
}
AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
},
_migrateUI: function BG__migrateUI() {
- const UI_VERSION = 41;
+ const UI_VERSION = 42;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion;
if (Services.prefs.prefHasUserValue("browser.migration.version")) {
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
} else {
// This is a new profile, nothing to migrate.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
@@ -2096,16 +2096,22 @@ BrowserGlue.prototype = {
}
}
if (currentUIVersion < 41) {
const Preferences = Cu.import("resource://gre/modules/Preferences.jsm", {}).Preferences;
Preferences.resetBranch("loop.");
}
+ if (currentUIVersion < 42) {
+ let backupFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
+ backupFile.append("tabgroups-session-backup.json");
+ OS.File.remove(backupFile.path, {ignoreAbsent: true}).catch(ex => Cu.reportError(ex));
+ }
+
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},
_hasExistingNotificationPermission: function BG__hasExistingNotificationPermission() {
let enumerator = Services.perms.enumerator;
while (enumerator.hasMoreElements()) {
let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);