Back out ba95fffe62b9 and 564283498a6f for Australis (bug 930970), r=jaws,Unfocused
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 05 Nov 2013 10:23:40 +0100
changeset 154307 232b16a39c877d4d7ab7445c70b93fef0f9c9745
parent 154306 d62709c0f7233acbac602869122911a94b19d946
child 154308 853a39fedb087554c05c7e1a806882896e69e860
push id595
push usergijskruitbosch@gmail.com
push dateTue, 05 Nov 2013 09:24:01 +0000
treeherderux@232b16a39c87 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, Unfocused
bugs930970
milestone28.0a1
backs outba95fffe62b944bdf37ffb0d65b7878a558aefd7
Back out ba95fffe62b9 and 564283498a6f for Australis (bug 930970), r=jaws,Unfocused
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1282,57 +1282,25 @@ BrowserGlue.prototype = {
                                                     notifyBox.PRIORITY_CRITICAL_MEDIUM,
                                                     buttons);
     notification.persistence = -1; // Until user closes it
   },
 
   _migrateUI: function BG__migrateUI() {
     const UI_VERSION = 17;
     const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
-
-    let wasCustomizedAndOnAustralis = Services.prefs.prefHasUserValue("browser.uiCustomization.state");
     let currentUIVersion = 0;
     try {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
     } catch(ex) {}
-    if (!wasCustomizedAndOnAustralis && currentUIVersion >= UI_VERSION)
+    if (currentUIVersion >= UI_VERSION)
       return;
 
     this._rdf = Cc["@mozilla.org/rdf/rdf-service;1"].getService(Ci.nsIRDFService);
     this._dataSource = this._rdf.GetDataSource("rdf:local-store");
-
-    // No version check for this as this code should run until we have Australis everywhere:
-    if (wasCustomizedAndOnAustralis) {
-      // This profile's been on australis! If it's missing the back/fwd button
-      // or go/stop/reload button, then put them back:
-      let currentsetResource = this._rdf.GetResource("currentset");
-      let toolbarResource = this._rdf.GetResource(BROWSER_DOCURL + "nav-bar");
-      let currentset = this._getPersist(toolbarResource, currentsetResource);
-      if (currentset.indexOf("unified-back-forward-button") == -1) {
-        currentset = currentset.replace("urlbar-container",
-                                        "unified-back-forward-button,urlbar-container");
-      }
-      if (currentset.indexOf("reload-button") == -1) {
-        currentset = currentset.replace("urlbar-container", "urlbar-container,reload-button");
-      }
-      if (currentset.indexOf("stop-button") == -1) {
-        currentset = currentset.replace("reload-button", "reload-button,stop-button");
-      }
-      this._setPersist(toolbarResource, currentsetResource, currentset);
-      Services.prefs.clearUserPref("browser.uiCustomization.state");
-
-      // If we don't have anything else to do, we can bail here:
-      if (currentUIVersion >= UI_VERSION) {
-        delete this._rdf;
-        delete this._dataSource;
-        return;
-      }
-    }
-
-
     this._dirty = false;
 
     if (currentUIVersion < 2) {
       // This code adds the customizable bookmarks button.
       let currentsetResource = this._rdf.GetResource("currentset");
       let toolbarResource = this._rdf.GetResource(BROWSER_DOCURL + "nav-bar");
       let currentset = this._getPersist(toolbarResource, currentsetResource);
       // Need to migrate only if toolbar is customized and the element is not found.