From ad57a51ea3199dcbeabfc10bc0e0af36465c3d62 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Mon, 26 Mar 2012 13:03:14 -0700 Subject: [PATCH] Bug 730989 - Remove references to now defunct Weave.Service.* properties; r=rnewman --- browser/components/preferences/sync.js | 2 +- mobile/xul/chrome/content/sync.js | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/browser/components/preferences/sync.js b/browser/components/preferences/sync.js index 3bf063bb615..b4916a21502 100644 --- a/browser/components/preferences/sync.js +++ b/browser/components/preferences/sync.js @@ -101,7 +101,7 @@ let gSyncPane = { this.needsUpdate(); } else { this.page = PAGE_HAS_ACCOUNT; - document.getElementById("accountName").value = Weave.Service.account; + document.getElementById("accountName").value = Weave.Identity.account; document.getElementById("syncComputerName").value = Weave.Clients.localName; document.getElementById("tosPP").hidden = this._usingCustomServer; } diff --git a/mobile/xul/chrome/content/sync.js b/mobile/xul/chrome/content/sync.js index 5303b0035c4..caafe028dd3 100644 --- a/mobile/xul/chrome/content/sync.js +++ b/mobile/xul/chrome/content/sync.js @@ -335,7 +335,7 @@ let WeaveGlue = { // Now try to re-connect. If successful, this will reset the UI into the // correct state automatically. - Weave.Service.login(Weave.Service.username, this.setupData.password, this.setupData.synckey); + Weave.Service.login(Weave.Identity.username, this.setupData.password, this.setupData.synckey); }, connect: function connect(aSetupData) { @@ -344,7 +344,7 @@ let WeaveGlue = { this.setupData = aSetupData; // Cause the Sync system to reset internals if we seem to be switching accounts - if (this.setupData.account != Weave.Service.account) + if (this.setupData.account != Weave.Identity.account) Weave.Service.startOver(); // Remove any leftover connection error string @@ -355,9 +355,9 @@ let WeaveGlue = { Weave.Service.serverURL = this.setupData.serverURL; // Sync will use the account value and munge it into a username, as needed - Weave.Service.account = this.setupData.account; - Weave.Service.password = this.setupData.password; - Weave.Service.passphrase = this.setupData.synckey; + Weave.Identity.account = this.setupData.account; + Weave.Identity.basicPassword = this.setupData.password; + Weave.Identity.syncKey = this.setupData.synckey; Weave.Service.persistLogin(); Weave.Svc.Obs.notify("weave:service:setup-complete"); setTimeout(function () { Weave.Service.sync(); }, 0); @@ -505,7 +505,7 @@ let WeaveGlue = { }, 0, this); // Dynamically generate some strings - let accountStr = this._bundle.formatStringFromName("account.label", [Weave.Service.account], 1); + let accountStr = this._bundle.formatStringFromName("account.label", [Weave.Identity.account], 1); disconnect.setAttribute("title", accountStr); // Show the day-of-week and time (HH:MM) of last sync @@ -589,9 +589,9 @@ let WeaveGlue = { loadSetupData: function _loadSetupData() { this.setupData = {}; - this.setupData.account = Weave.Service.account || ""; - this.setupData.password = Weave.Service.password || ""; - this.setupData.synckey = Weave.Service.passphrase || ""; + this.setupData.account = Weave.Identity.account || ""; + this.setupData.password = Weave.Identity.basicPassword || ""; + this.setupData.synckey = Weave.Identity.syncKey || ""; let serverURL = Weave.Service.serverURL; let defaultPrefs = Services.prefs.getDefaultBranch(null); @@ -652,9 +652,9 @@ let SyncPairDevice = { let self = this; let jpake = this.jpake = new Weave.JPAKEClient({ onPaired: function onPaired() { - let credentials = {account: Weave.Service.account, - password: Weave.Service.password, - synckey: Weave.Service.passphrase, + let credentials = {account: Weave.Identity.account, + password: Weave.Identity.basicPassword, + synckey: Weave.Identity.syncKey, serverURL: Weave.Service.serverURL}; jpake.sendAndComplete(credentials); },