summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2019-03-17 18:39:46 -0400
committerGaming4JC <g4jc@bulletmail.org>2019-03-17 18:39:46 -0400
commit397e4f8772be74baa140b8a5bcfa8408887598bb (patch)
tree20af8e8af1fbf672c541a4d23a4552d143842d84 /base
parent149fcd2c0941e3e06167750f99f1bff033b1c931 (diff)
downloadiceweasel-uxp-397e4f8772be74baa140b8a5bcfa8408887598bb.tar.gz
backport uxp #812: Remove fxAccountsEnabled checks.
Diffstat (limited to 'base')
-rw-r--r--base/content/browser-syncui.js35
-rw-r--r--base/content/sync/aboutSyncTabs.js14
-rw-r--r--base/content/sync/utils.js13
3 files changed, 5 insertions, 57 deletions
diff --git a/base/content/browser-syncui.js b/base/content/browser-syncui.js
index 3a57140..b796e66 100644
--- a/base/content/browser-syncui.js
+++ b/base/content/browser-syncui.js
@@ -4,11 +4,6 @@
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-#ifdef MOZ_SERVICES_CLOUDSYNC
-XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
- "resource://gre/modules/CloudSync.jsm");
-#endif
-
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
"resource://gre/modules/FxAccounts.jsm");
@@ -98,14 +93,6 @@ var gSyncUI = {
// Returns a promise that resolves with true if Sync needs to be configured,
// false otherwise.
_needsSetup() {
- // If Sync is configured for FxAccounts then we do that promise-dance.
- if (this.weaveService.fxAccountsEnabled) {
- return fxAccounts.getSignedInUser().then(user => {
- // We want to treat "account needs verification" as "needs setup".
- return !(user && user.verified);
- });
- }
- // We are using legacy sync - check that.
let firstSync = "";
try {
firstSync = Services.prefs.getCharPref("services.sync.firstSync");
@@ -119,19 +106,9 @@ var gSyncUI = {
// to Sync needs to be verified, false otherwise.
_needsVerification() {
// For callers who care about the distinction between "needs setup" and
- // "needs verification"
- if (this.weaveService.fxAccountsEnabled) {
- return fxAccounts.getSignedInUser().then(user => {
- // If there is no user, they can't be in a "needs verification" state.
- if (!user) {
- return false;
- }
- return !user.verified;
- });
- }
-
- // Otherwise we are configured for legacy Sync, which has no verification
- // concept.
+ // "needs verification". Only for fxAccounts. XXX: remove this check.
+ // Since we are configured for legacy Sync only, which has no verification
+ // concept, just return false.
return Promise.resolve(false);
},
@@ -171,13 +148,7 @@ var gSyncUI = {
document.getElementById("sync-setup-state").hidden = true;
document.getElementById("sync-syncnow-state").hidden = true;
-#ifdef MOZ_SERVICES_CLOUDSYNC
- if (CloudSync && CloudSync.ready && CloudSync().adapters.count) {
- document.getElementById("sync-syncnow-state").hidden = false;
- } else if (loginFailed) {
-#else
if (loginFailed) {
-#endif
// unhiding this element makes the menubar show the login failure state.
document.getElementById("sync-reauth-state").hidden = false;
} else if (needsSetup) {
diff --git a/base/content/sync/aboutSyncTabs.js b/base/content/sync/aboutSyncTabs.js
index f4bb607..08986f7 100644
--- a/base/content/sync/aboutSyncTabs.js
+++ b/base/content/sync/aboutSyncTabs.js
@@ -14,11 +14,6 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
"resource://gre/modules/Promise.jsm");
-#ifdef MOZ_SERVICES_CLOUDSYNC
-XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
- "resource://gre/modules/CloudSync.jsm");
-#endif
-
var RemoteTabViewer = {
_tabsList: null,
@@ -183,16 +178,7 @@ var RemoteTabViewer = {
}
}
-#ifdef MOZ_SERVICES_CLOUDSYNC
- if (CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs()) {
- this._generateCloudSyncTabList()
- .then(complete, complete);
- } else {
- complete();
- }
-#else
complete();
-#endif
},
_clearTabList: function () {
diff --git a/base/content/sync/utils.js b/base/content/sync/utils.js
index 92981f7..089c1f9 100644
--- a/base/content/sync/utils.js
+++ b/base/content/sync/utils.js
@@ -14,13 +14,6 @@ var gSyncUtils = {
return this.bundle = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
},
- get fxAccountsEnabled() {
- let service = Components.classes["@mozilla.org/weave/service;1"]
- .getService(Components.interfaces.nsISupports)
- .wrappedJSObject;
- return service.fxAccountsEnabled;
- },
-
// opens in a new window if we're in a modal prefwindow world, in a new tab otherwise
_openLink: function (url) {
let thisDocEl = document.documentElement,
@@ -78,8 +71,7 @@ var gSyncUtils = {
},
get tosURL() {
- let root = this.fxAccountsEnabled ? "fxa." : "";
- return Weave.Svc.Prefs.get(root + "termsURL");
+ return Weave.Svc.Prefs.get("termsURL");
},
openToS: function () {
@@ -87,8 +79,7 @@ var gSyncUtils = {
},
get privacyPolicyURL() {
- let root = this.fxAccountsEnabled ? "fxa." : "";
- return Weave.Svc.Prefs.get(root + "privacyURL");
+ return Weave.Svc.Prefs.get("privacyURL");
},
openPrivacyPolicy: function () {