summaryrefslogtreecommitdiffstats
path: root/services/sync/modules/identity.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-06 07:09:02 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-06 07:09:02 +0200
commit18473f1844a8230130e1fc23d7ebf7d33183316f (patch)
tree75d297ab7eac48e14af88e565dc1e19775de9df1 /services/sync/modules/identity.js
parent0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (diff)
downloadUXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar
UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.gz
UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.lz
UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.xz
UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.zip
Update sync client for JS changes.
Diffstat (limited to 'services/sync/modules/identity.js')
-rw-r--r--services/sync/modules/identity.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/services/sync/modules/identity.js b/services/sync/modules/identity.js
index 2bee13b5b..cd28f5efe 100644
--- a/services/sync/modules/identity.js
+++ b/services/sync/modules/identity.js
@@ -6,7 +6,7 @@
this.EXPORTED_SYMBOLS = ["IdentityManager"];
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Promise.jsm");
@@ -206,7 +206,7 @@ IdentityManager.prototype = {
return null;
}
- for each (let login in this._getLogins(PWDMGR_PASSWORD_REALM)) {
+ for (let login of this._getLogins(PWDMGR_PASSWORD_REALM)) {
if (login.username.toLowerCase() == username) {
// It should already be UTF-8 encoded, but we don't take any chances.
this._basicPassword = Utils.encodeUTF8(login.password);
@@ -260,7 +260,7 @@ IdentityManager.prototype = {
return null;
}
- for each (let login in this._getLogins(PWDMGR_PASSPHRASE_REALM)) {
+ for (let login of this._getLogins(PWDMGR_PASSPHRASE_REALM)) {
if (login.username.toLowerCase() == username) {
this._syncKey = login.password;
}
@@ -411,7 +411,7 @@ IdentityManager.prototype = {
this._setLogin(PWDMGR_PASSWORD_REALM, this.username,
this._basicPassword);
} else {
- for each (let login in this._getLogins(PWDMGR_PASSWORD_REALM)) {
+ for (let login of this._getLogins(PWDMGR_PASSWORD_REALM)) {
Services.logins.removeLogin(login);
}
}
@@ -423,7 +423,7 @@ IdentityManager.prototype = {
if (this._syncKey) {
this._setLogin(PWDMGR_PASSPHRASE_REALM, this.username, this._syncKey);
} else {
- for each (let login in this._getLogins(PWDMGR_PASSPHRASE_REALM)) {
+ for (let login of this._getLogins(PWDMGR_PASSPHRASE_REALM)) {
Services.logins.removeLogin(login);
}
}
@@ -477,7 +477,7 @@ IdentityManager.prototype = {
*/
_setLogin: function _setLogin(realm, username, password) {
let exists = false;
- for each (let login in this._getLogins(realm)) {
+ for (let login of this._getLogins(realm)) {
if (login.username == username && login.password == password) {
exists = true;
} else {
@@ -513,7 +513,7 @@ IdentityManager.prototype = {
deleteSyncCredentials: function deleteSyncCredentials() {
for (let host of this._getSyncCredentialsHosts()) {
let logins = Services.logins.findLogins({}, host, "", "");
- for each (let login in logins) {
+ for (let login of logins) {
Services.logins.removeLogin(login);
}
}