Bug 1208145 - Clear XUL persistence data for passwordManager.xul passwordCol.hidden. r=dolske a=ritu
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Wed, 13 Jan 2016 16:40:30 -0800
changeset 310810 3384695f473b9ab1796e75c22787b2410e0e54ba
parent 310809 0db1f9106ce69fa2614433717e79932f19d00bc6
child 310811 6252d26907b6133474714aabea3249922cc3a297
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske, ritu
bugs1208145, 1121291
milestone45.0a2
Bug 1208145 - Clear XUL persistence data for passwordManager.xul passwordCol.hidden. r=dolske a=ritu Bug 1121291 made @hidden persist but we are reverting that change so we need to remove the values so the password column doesn't always show by default.
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1895,17 +1895,17 @@ BrowserGlue.prototype = {
     var notifyBox = win.gBrowser.getNotificationBox();
     var notification = notifyBox.appendNotification(text, title, null,
                                                     notifyBox.PRIORITY_CRITICAL_MEDIUM,
                                                     buttons);
     notification.persistence = -1; // Until user closes it
   },
 
   _migrateUI: function BG__migrateUI() {
-    const UI_VERSION = 35;
+    const UI_VERSION = 36;
     const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
     let currentUIVersion = 0;
     try {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
     } catch(ex) {}
     if (currentUIVersion >= UI_VERSION)
       return;
 
@@ -2245,16 +2245,22 @@ BrowserGlue.prototype = {
       this._notifyNotificationsUpgrade().catch(Cu.reportError);
     }
 
     // Only do this outside of safe mode, because in safe mode we do this earlier.
     if (currentUIVersion < 35 && !Services.appinfo.inSafeMode) {
       this._maybeMigrateTabGroups();
     }
 
+    if (currentUIVersion < 36) {
+      xulStore.removeValue("chrome://passwordmgr/content/passwordManager.xul",
+                           "passwordCol",
+                           "hidden");
+    }
+
     // 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);