From 08889aeff55acf6d250d6ed091019c973305544b Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Mon, 25 Jul 2016 12:20:36 +0200 Subject: [PATCH] Backed out changeset d15abe37a931 (bug 1058438) --- toolkit/components/passwordmgr/LoginStore.jsm | 2 -- .../components/passwordmgr/storage-json.js | 24 +++---------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/toolkit/components/passwordmgr/LoginStore.jsm b/toolkit/components/passwordmgr/LoginStore.jsm index ff357571692b..f21b5e45e110 100644 --- a/toolkit/components/passwordmgr/LoginStore.jsm +++ b/toolkit/components/passwordmgr/LoginStore.jsm @@ -268,8 +268,6 @@ LoginStore.prototype = { if (!this.data.logins) { this.data.logins = []; } - - // Stub needed for login imports before data has been migrated. if (!this.data.disabledHosts) { this.data.disabledHosts = []; } diff --git a/toolkit/components/passwordmgr/storage-json.js b/toolkit/components/passwordmgr/storage-json.js index aba82d4e7914..6eea1a0c9a26 100644 --- a/toolkit/components/passwordmgr/storage-json.js +++ b/toolkit/components/passwordmgr/storage-json.js @@ -27,9 +27,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "gUUIDGenerator", "@mozilla.org/uuid-generator;1", "nsIUUIDGenerator"); -// The permission type we store in the permission manager. -const PERMISSION_SAVE_LOGINS = "login-saving"; - this.LoginManagerStorage_json = function () {}; this.LoginManagerStorage_json.prototype = { @@ -87,24 +84,7 @@ this.LoginManagerStorage_json.prototype = { // We won't attempt import again on next startup. Services.prefs.setBoolPref("signon.importedFromSqlite", true); - }.bind(this)).catch(Cu.reportError) - .then(Task.spawn(function () { - // If the storage has a disabledHosts entry we migrate them - // to the permissions manager (bug 1058438) - if (!this._store.data || !this._store.data.disabledHosts) { - return; // already migrated. - } - for (let host of this._store.data.disabledHosts) { - try { - let uri = Services.io.newURI(host, null, null); - Services.perms.add(uri, PERMISSION_SAVE_LOGINS, Services.perms.DENY_ACTION); - } catch (e) { - Cu.reportError(e); - } - } - delete this._store.data.disabledHosts; - this._store.saveSoon(); - }.bind(this))).catch(Cu.reportError); + }.bind(this)).catch(Cu.reportError); } catch (e) { this.log("Initialization failed:", e); throw new Error("Initialization failed"); @@ -386,6 +366,8 @@ this.LoginManagerStorage_json.prototype = { /** * Removes all logins from storage. + * + * Disabled hosts are kept, as one presumably doesn't want to erase those. */ removeAllLogins() { this._store.ensureDataReady();