diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-06 10:39:22 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-06 10:39:22 -0500 |
commit | cf4ad4e969bf553c4e7bcf79e8f3a98783584070 (patch) | |
tree | 8575660d9967c4390fd4317ecf0882c0d96c3745 /toolkit/components/passwordmgr/nsLoginManager.js | |
parent | 741abd440e4f4c4d91799f06c826e0f879c5c837 (diff) | |
download | UXP-cf4ad4e969bf553c4e7bcf79e8f3a98783584070.tar UXP-cf4ad4e969bf553c4e7bcf79e8f3a98783584070.tar.gz UXP-cf4ad4e969bf553c4e7bcf79e8f3a98783584070.tar.lz UXP-cf4ad4e969bf553c4e7bcf79e8f3a98783584070.tar.xz UXP-cf4ad4e969bf553c4e7bcf79e8f3a98783584070.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); |