diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-06 10:39:22 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:39:35 +0200 |
commit | 30ec922d7e7a71e75d9bd636647e8704aa6f1f0c (patch) | |
tree | 289d8332bbb9c6a14adf011da8b20792cbb3bd50 /toolkit/components/passwordmgr/nsLoginManager.js | |
parent | 1000488a5bcdc5078b96c1781a260932c5ae39f1 (diff) | |
download | UXP-30ec922d7e7a71e75d9bd636647e8704aa6f1f0c.tar UXP-30ec922d7e7a71e75d9bd636647e8704aa6f1f0c.tar.gz UXP-30ec922d7e7a71e75d9bd636647e8704aa6f1f0c.tar.lz UXP-30ec922d7e7a71e75d9bd636647e8704aa6f1f0c.tar.xz UXP-30ec922d7e7a71e75d9bd636647e8704aa6f1f0c.zip |
Issue #65 - Remove AppConstants from toolkit/components/passwordmgr
Diffstat (limited to 'toolkit/components/passwordmgr/nsLoginManager.js')
-rw-r--r-- | toolkit/components/passwordmgr/nsLoginManager.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/toolkit/components/passwordmgr/nsLoginManager.js b/toolkit/components/passwordmgr/nsLoginManager.js index 514351fa5..87466fe5c 100644 --- a/toolkit/components/passwordmgr/nsLoginManager.js +++ b/toolkit/components/passwordmgr/nsLoginManager.js @@ -8,7 +8,6 @@ const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components; const PERMISSION_SAVE_LOGINS = "login-saving"; -Cu.import("resource://gre/modules/AppConstants.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Timer.jsm"); @@ -113,12 +112,12 @@ LoginManager.prototype = { _initStorage() { - let contractID; - if (AppConstants.platform == "android") { - contractID = "@mozilla.org/login-manager/storage/mozStorage;1"; - } else { - contractID = "@mozilla.org/login-manager/storage/json;1"; - } +#ifdef MOZ_WIDGET_ANDROID + let contractID = "@mozilla.org/login-manager/storage/mozStorage;1"; +#else + let contractID = "@mozilla.org/login-manager/storage/json;1"; +#endif + try { let catMan = Cc["@mozilla.org/categorymanager;1"]. getService(Ci.nsICategoryManager); |