Back out e78a7c6d9601 (bug 965896) for xpcshell orange

This commit is contained in:
Phil Ringnalda 2014-02-04 21:19:19 -08:00
parent 222d7dc0e4
commit c85ec9721d
3 changed files with 6 additions and 22 deletions

View File

@ -85,7 +85,7 @@ let gSyncPane = {
_init: function () {
let topics = ["weave:service:login:error",
"weave:service:login:finish",
"weave:service:start-over:finish",
"weave:service:start-over",
"weave:service:setup-complete",
"weave:service:logout:finish",
FxAccountsCommon.ONVERIFIED_NOTIFICATION];

View File

@ -106,10 +106,10 @@ WeaveService.prototype = {
fxAccountsEnabled = !prefs.prefHasUserValue("username");
Services.prefs.setBoolPref("services.sync.fxaccounts.enabled", fxAccountsEnabled);
}
// Currently we don't support toggling this pref after initialization -
// except when sync is reset - but this 1 exception is enough that we can't
// cache the value.
return fxAccountsEnabled;
// Currently we don't support toggling this pref after initialization, so
// inject the pref value as a regular boolean.
delete this.fxAccountsEnabled;
return this.fxAccountsEnabled = fxAccountsEnabled;
},
observe: function (subject, topic, data) {

View File

@ -889,23 +889,7 @@ Sync11Service.prototype = {
this.identity.deleteSyncCredentials();
// Reset the identity manager, then re-initialize it so the FxA manager is
// used.
this.identity.username = "";
Services.prefs.clearUserPref("services.sync.fxaccounts.enabled");
this.status.__authManager = null;
this.identity = Status._authManager;
this._clusterManager = this.identity.createClusterManager(this);
// Tell the new identity manager to initialize itself
this.identity.initialize().then(() => {
Svc.Obs.notify("weave:service:start-over:finish");
}).then(null, err => {
this._log.error("startOver failed to re-initialize the identity manager: " + err);
// Still send the observer notification so the current state is
// reflected in the UI.
Svc.Obs.notify("weave:service:start-over:finish");
});
Svc.Obs.notify("weave:service:start-over:finish");
},
persistLogin: function persistLogin() {