diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index e0714ad66..d9bf33c6b 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1454,14 +1454,14 @@ pref("browser.uiCustomization.debug", false); pref("browser.uiCustomization.state", ""); // The remote content URL shown for FxA signup. Must use HTTPS. -pref("identity.fxaccounts.remote.signup.uri", "https://accounts.firefox.com/signup?service=sync&context=fx_desktop_v2"); +pref("identity.fxaccounts.remote.signup.uri", "https://accounts.firefox.com/signup?service=sync&context=fx_desktop_v3"); // The URL where remote content that forces re-authentication for Firefox Accounts // should be fetched. Must use HTTPS. -pref("identity.fxaccounts.remote.force_auth.uri", "https://accounts.firefox.com/force_auth?service=sync&context=fx_desktop_v2"); +pref("identity.fxaccounts.remote.force_auth.uri", "https://accounts.firefox.com/force_auth?service=sync&context=fx_desktop_v3"); // The remote content URL shown for signin in. Must use HTTPS. -pref("identity.fxaccounts.remote.signin.uri", "https://accounts.firefox.com/signin?service=sync&context=fx_desktop_v2"); +pref("identity.fxaccounts.remote.signin.uri", "https://accounts.firefox.com/signin?service=sync&context=fx_desktop_v3"); // The remote content URL where FxAccountsWebChannel messages originate. pref("identity.fxaccounts.remote.webchannel.uri", "https://accounts.firefox.com/"); diff --git a/services/fxaccounts/FxAccountsWebChannel.jsm b/services/fxaccounts/FxAccountsWebChannel.jsm index 0985498de..4a871b408 100644 --- a/services/fxaccounts/FxAccountsWebChannel.jsm +++ b/services/fxaccounts/FxAccountsWebChannel.jsm @@ -30,6 +30,7 @@ const COMMAND_CAN_LINK_ACCOUNT = "fxaccounts:can_link_account"; const COMMAND_LOGIN = "fxaccounts:login"; const COMMAND_LOGOUT = "fxaccounts:logout"; const COMMAND_DELETE = "fxaccounts:delete"; +const COMMAND_SYNC_PREFERENCES = "fxaccounts:sync_preferences"; const PREF_LAST_FXA_USER = "identity.fxaccounts.lastSignedInUserHash"; const PREF_SYNC_SHOW_CUSTOMIZATION = "services.sync-setup.ui.showCustomizationDialog"; @@ -168,6 +169,9 @@ this.FxAccountsWebChannel.prototype = { log.debug("FxAccountsWebChannel response", response); this._channel.send(response, sendingContext); break; + case COMMAND_SYNC_PREFERENCES: + this._helpers.openSyncPreferences(sendingContext.browser, data.entryPoint); + break; default: log.warn("Unrecognized FxAccountsWebChannel command", command); break; @@ -309,6 +313,22 @@ this.FxAccountsWebChannelHelpers.prototype = { return hasher.finish(true); }, + /** + * Open Sync Preferences in the current tab of the browser + * + * @param {Object} browser the browser in which to open preferences + * @param {String} [entryPoint] entryPoint to use for logging + */ + openSyncPreferences(browser, entryPoint) { + let uri = "about:preferences"; + if (entryPoint) { + uri += "?entrypoint=" + encodeURIComponent(entryPoint); + } + uri += "#sync"; + + browser.loadURI(uri); + }, + /** * If a user signs in using a different account, the data from the * previous account and the new account will be merged. Ask the user