Bug 1378108 - Part 3 - Migrate Firebug theme users to the light theme;r=Gijs draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 04 Apr 2018 12:33:06 -0700
changeset 777452 f1fe2b585fcda51d17dceabc4d62da4d36a9de91
parent 777451 e4b1609bff47753d01d4c21ceaca993ce8d93071
push id105210
push userbgrinstead@mozilla.com
push dateWed, 04 Apr 2018 19:33:17 +0000
reviewersGijs
bugs1378108
milestone61.0a1
Bug 1378108 - Part 3 - Migrate Firebug theme users to the light theme;r=Gijs MozReview-Commit-ID: 9a8bNvMVAGr
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1833,17 +1833,17 @@ BrowserGlue.prototype = {
       if (toolbarIsCustomized || getToolbarFolderCount() > NUM_TOOLBAR_BOOKMARKS_TO_UNHIDE) {
         xulStore.setValue(BROWSER_DOCURL, "PersonalToolbar", "collapsed", "false");
       }
     }
   },
 
   // eslint-disable-next-line complexity
   _migrateUI: function BG__migrateUI() {
-    const UI_VERSION = 66;
+    const UI_VERSION = 67;
     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);
@@ -2182,16 +2182,23 @@ BrowserGlue.prototype = {
     }
 
     if (currentUIVersion < 66) {
       // Set whether search suggestions or history/bookmarks results come first
       // in the urlbar results, and uninstall a related Shield study.
       this._migrateMatchBucketsPrefForUI66();
     }
 
+    if (currentUIVersion < 67) {
+      // Migrate devtools firebug theme users to light theme (bug 1378108):
+      if (Services.prefs.getCharPref("devtools.theme") == "firebug") {
+        Services.prefs.setCharPref("devtools.theme", "light");
+      }
+    }
+
     // Update the migration version.
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
   _checkForDefaultBrowser() {
     // Perform default browser checking.
     if (!ShellService) {
       return;