summaryrefslogtreecommitdiffstats
path: root/services/sync/Weave.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@wolfbeast.com>2018-12-12 11:01:48 +0100
committerGitHub <noreply@github.com>2018-12-12 11:01:48 +0100
commitbc8a25f5e33700f700b1e07b238bef5dae22f1ad (patch)
treec1f1ec816f1a85459d05bd6a4cf4f6170b01c602 /services/sync/Weave.js
parentf2d4bd1e395f903355cc157a1de7207e5b22b7fb (diff)
parent9697bfa68f32984b196748e388d743dddbe6aa7b (diff)
downloadUXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar
UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.gz
UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.lz
UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.xz
UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.zip
Merge pull request #898 from MoonchildProductions/Sync-weave
Remove FxA Phase 1
Diffstat (limited to 'services/sync/Weave.js')
-rw-r--r--services/sync/Weave.js26
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)