diff options
Diffstat (limited to 'services/sync/Weave.js')
-rw-r--r-- | services/sync/Weave.js | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/services/sync/Weave.js b/services/sync/Weave.js index de131d08a..5bafa07ad 100644 --- a/services/sync/Weave.js +++ b/services/sync/Weave.js @@ -93,26 +93,6 @@ WeaveService.prototype = { }, /** - * Whether Firefox Accounts is enabled. - * - * @return bool - */ - get fxAccountsEnabled() { -#ifdef MC_PALEMOON - return false; -#else - try { - // Old sync guarantees '@' will never appear in the username while FxA - // uses the FxA email address - so '@' is the flag we use. - let username = Services.prefs.getCharPref(SYNC_PREFS_BRANCH + "username"); - return !username || username.includes('@'); - } catch (_) { - return true; // No username == only allow FxA to be configured. - } -#endif - }, - - /** * Whether Sync appears to be enabled. * * This returns true if all the Sync preferences for storing account @@ -123,7 +103,8 @@ WeaveService.prototype = { */ get enabled() { let prefs = Services.prefs.getBranch(SYNC_PREFS_BRANCH); - return prefs.prefHasUserValue("username"); + return prefs.prefHasUserValue("username") && + prefs.prefHasUserValue("clusterURL"); }, observe: function (subject, topic, data) { @@ -151,10 +132,7 @@ WeaveService.prototype = { Components.utils.import("resource://services-sync/main.js"); isConfigured = Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED; } - let getHistogramById = Services.telemetry.getHistogramById; - getHistogramById("WEAVE_CONFIGURED").add(isConfigured); if (isConfigured) { - getHistogramById("WEAVE_CONFIGURED_MASTER_PASSWORD").add(Utils.mpEnabled()); this.ensureLoaded(); } }.bind(this) |