Bug 1227230 - Remove all of the e10s prompting code. r=jimm
This removes all of the e10s-related prompting code, including:
- doorhanger offering to opt-in into e10s
- pref and telemetry probe used to measure the number of users who remained opted-in
- dialog that shows up when unchecking the e10s checkbox saying that a tab will open, requesting feedback
- tab opening requesting feedback
- all related strings
The checkbox in the preferences window remains (nightly/aurora only), as well as the message saying that e10s requires a restart.
The e10s accessibility doorhanger remains. and chrome://browser/skin/e10s-64@2x.png remains too because it's also used in the a11y doorhanger.
MozReview-Commit-ID: aOdvnbeHOa
--- a/addon-sdk/source/python-lib/cuddlefish/prefs.py
+++ b/addon-sdk/source/python-lib/cuddlefish/prefs.py
@@ -32,19 +32,16 @@ DEFAULT_COMMON_PREFS = {
# Disable intalling any distribution add-ons
'extensions.installDistroAddons' : False,
# Allow installing extensions dropped into the profile folder
'extensions.autoDisableScopes' : 10,
# shut up some warnings on `about:` page
'app.releaseNotesURL': 'http://localhost/app-dummy/',
'app.vendorURL': 'http://localhost/app-dummy/',
-
- # Don't prompt about e10s
- 'browser.displayedE10SPrompt.1': 5
}
DEFAULT_NO_CONNECTIONS_PREFS = {
'toolkit.telemetry.enabled': False,
'toolkit.telemetry.server': 'https://localhost/telemetry-dummy/',
'app.update.auto' : False,
'app.update.url': 'http://localhost/app-dummy/update',
# Make sure GMPInstallManager won't hit the network.
--- a/addon-sdk/source/test/preferences/e10s-off.json
+++ b/addon-sdk/source/test/preferences/e10s-off.json
@@ -1,6 +1,5 @@
{
- "browser.displayedE10SPrompt.1": 5,
"browser.tabs.remote.autostart": false,
"browser.tabs.remote.autostart.1": false,
"browser.tabs.remote.autostart.2": false
}
--- a/browser/base/content/popup-notifications.inc
+++ b/browser/base/content/popup-notifications.inc
@@ -71,22 +71,16 @@
<textbox id="login-fill-username" readonly="true"/>
<textbox id="login-fill-password" type="password" disabled="true"/>
<hbox>
<button id="login-fill-use" label="Use in form"/>
</hbox>
</vbox>
</stack>
-#ifdef E10S_TESTING_ONLY
- <popupnotification id="enable-e10s-notification" hidden="true">
- <popupnotificationcontent orient="vertical"/>
- </popupnotification>
-#endif
-
<popupnotification id="addon-progress-notification" hidden="true">
<popupnotificationcontent orient="vertical">
<progressmeter id="addon-progress-notification-progressmeter"/>
<label id="addon-progress-notification-progresstext" crop="end"/>
</popupnotificationcontent>
<button id="addon-progress-cancel"
oncommand="this.parentNode.cancel();"/>
<button id="addon-progress-accept" disabled="true"/>
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -112,21 +112,16 @@ XPCOMUtils.defineLazyModuleGetter(this,
"resource://gre/modules/LoginHelper.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "SimpleServiceDiscovery",
"resource://gre/modules/SimpleServiceDiscovery.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ContentSearch",
"resource:///modules/ContentSearch.jsm");
-if (AppConstants.E10S_TESTING_ONLY) {
- XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
- "resource://gre/modules/UpdateUtils.jsm");
-}
-
XPCOMUtils.defineLazyModuleGetter(this, "TabCrashHandler",
"resource:///modules/ContentCrashHandlers.jsm");
if (AppConstants.MOZ_CRASHREPORTER) {
XPCOMUtils.defineLazyModuleGetter(this, "PluginCrashReporter",
"resource:///modules/ContentCrashHandlers.jsm");
}
XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
@@ -2991,164 +2986,16 @@ var DefaultBrowserCheck = {
let popup = doc.getElementById(this.OPTIONPOPUP);
popup.removeEventListener("command", this);
popup.remove();
delete this._notification;
}
},
};
-var E10SUINotification = {
- CURRENT_PROMPT_PREF: "browser.displayedE10SPrompt.1",
- PREVIOUS_PROMPT_PREF: "browser.displayedE10SPrompt",
-
- get forcedOn() {
- try {
- return Services.prefs.getBoolPref("browser.tabs.remote.force-enable");
- } catch (e) {}
- return false;
- },
-
- get a11yRecentlyRan() {
- try {
- if (Services.prefs.getBoolPref("accessibility.loadedInLastSession")) {
- return true;
- }
- } catch (e) {}
- try {
- Services.prefs.getBoolPref("accessibility.lastLoadDate");
- return true;
- } catch (e) {}
- return false;
- },
-
- checkStatus: function() {
- let updateChannel = UpdateUtils.UpdateChannel;
- let channelAuthorized = updateChannel == "nightly" || updateChannel == "aurora";
- if (!channelAuthorized) {
- return;
- }
-
- if (!Services.appinfo.browserTabsRemoteAutostart) {
- let displayFeedbackRequest = false;
- try {
- displayFeedbackRequest = Services.prefs.getBoolPref("browser.requestE10sFeedback");
- } catch (e) {}
-
- if (displayFeedbackRequest) {
- let win = RecentWindow.getMostRecentBrowserWindow();
- if (!win) {
- return;
- }
-
- Services.prefs.clearUserPref("browser.requestE10sFeedback");
-
- let url = Services.urlFormatter.formatURLPref("app.feedback.baseURL");
- url += "?utm_source=tab&utm_campaign=e10sfeedback";
-
- win.openUILinkIn(url, "tab");
- return;
- }
-
- // If accessibility recently ran, don't prompt about trying out e10s
- if (this.a11yRecentlyRan) {
- return;
- }
-
- let e10sPromptShownCount = 0;
- try {
- e10sPromptShownCount = Services.prefs.getIntPref(this.CURRENT_PROMPT_PREF);
- } catch(e) {}
-
- let isHardwareAccelerated = true;
- // Linux and Windows are currently ok, mac not so much.
- if (AppConstants.platform == "macosx") {
- try {
- let win = RecentWindow.getMostRecentBrowserWindow();
- let winutils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
- isHardwareAccelerated = winutils.layerManagerType != "Basic";
- } catch (e) {}
- }
-
- if (!Services.appinfo.inSafeMode &&
- !Services.appinfo.accessibilityEnabled &&
- isHardwareAccelerated &&
- e10sPromptShownCount < 5) {
- Services.tm.mainThread.dispatch(() => {
- try {
- this._showE10SPrompt();
- Services.prefs.setIntPref(this.CURRENT_PROMPT_PREF, e10sPromptShownCount + 1);
- Services.prefs.clearUserPref(this.PREVIOUS_PROMPT_PREF);
- } catch (ex) {
- Cu.reportError("Failed to show e10s prompt: " + ex);
- }
- }, Ci.nsIThread.DISPATCH_NORMAL);
- }
- }
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
-
- _showE10SPrompt: function BG__showE10SPrompt() {
- let win = RecentWindow.getMostRecentBrowserWindow();
- if (!win)
- return;
-
- let browser = win.gBrowser.selectedBrowser;
-
- let promptMessage = win.gNavigatorBundle.getFormattedString(
- "e10s.offerPopup.mainMessage",
- [gBrandBundle.GetStringFromName("brandShortName")]
- );
- let mainAction = {
- label: win.gNavigatorBundle.getString("e10s.offerPopup.enableAndRestart.label"),
- accessKey: win.gNavigatorBundle.getString("e10s.offerPopup.enableAndRestart.accesskey"),
- callback: function () {
- Services.prefs.setBoolPref("browser.tabs.remote.autostart", true);
- Services.prefs.setBoolPref("browser.enabledE10SFromPrompt", true);
- // Restart the app
- let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
- Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
- if (cancelQuit.data)
- return; // somebody canceled our quit request
- Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart);
- }
- };
- let secondaryActions = [
- {
- label: win.gNavigatorBundle.getString("e10s.offerPopup.noThanks.label"),
- accessKey: win.gNavigatorBundle.getString("e10s.offerPopup.noThanks.accesskey"),
- callback: function () {
- Services.prefs.setIntPref(E10SUINotification.CURRENT_PROMPT_PREF, 5);
- }
- }
- ];
- let options = {
- popupIconURL: "chrome://browser/skin/e10s-64@2x.png",
- learnMoreURL: "https://wiki.mozilla.org/Electrolysis",
- persistWhileVisible: true
- };
-
- win.PopupNotifications.show(browser, "enable-e10s", promptMessage, null, mainAction, secondaryActions, options);
-
- let highlights = [
- win.gNavigatorBundle.getString("e10s.offerPopup.highlight1"),
- win.gNavigatorBundle.getString("e10s.offerPopup.highlight2")
- ];
-
- let doorhangerExtraContent = win.document.getElementById("enable-e10s-notification")
- .querySelector("popupnotificationcontent");
- for (let highlight of highlights) {
- let highlightLabel = win.document.createElement("label");
- highlightLabel.setAttribute("value", highlight);
- doorhangerExtraContent.appendChild(highlightLabel);
- }
- }
-};
-
var E10SAccessibilityCheck = {
init: function() {
Services.obs.addObserver(this, "a11y-init-or-shutdown", true);
Services.obs.addObserver(this, "quit-application-granted", true);
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -156,22 +156,16 @@ var gMainPane = {
"restart");
shouldProceed = !cancelQuit.data;
if (shouldProceed) {
for (let prefToChange of prefsToChange) {
prefToChange.value = e10sCheckbox.checked;
}
- let tmp = {};
- Components.utils.import("resource://gre/modules/UpdateUtils.jsm", tmp);
- if (!e10sCheckbox.checked && tmp.UpdateUtils.UpdateChannel != "default") {
- Services.prefs.setBoolPref("browser.requestE10sFeedback", true);
- Services.prompt.alert(window, brandName, bundle.getString("e10sFeedbackAfterRestart"));
- }
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
}
}
// Revert the checkbox in case we didn't quit
e10sCheckbox.checked = e10sPref.value || e10sTempPref.value;
},
#endif
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -688,37 +688,23 @@ readingList.promo.firstUse.readerView.bo
# https://www.mozilla.org/firefox/android/.
# %2$S will be replaced with a link, the text of which is
# appMenuRemoteTabs.mobilePromo.ios
# and the link will be to https://www.mozilla.org/firefox/ios/.
appMenuRemoteTabs.mobilePromo.text2 = Download %1$S or %2$S and connect them to your Firefox Account.
appMenuRemoteTabs.mobilePromo.android = Firefox for Android
appMenuRemoteTabs.mobilePromo.ios = Firefox for iOS
-# LOCALIZATION NOTE (e10s.offerPopup.mainMessage
-# e10s.offerPopup.highlight1
-# e10s.offerPopup.highlight2
-# e10s.offerPopup.enableAndRestart.label
-# e10s.offerPopup.enableAndRestart.accesskey
-# e10s.offerPopup.noThanks.label
-# e10s.offerPopup.noThanks.accesskey
-# e10s.accessibilityNotice.mainMessage
-# e10s.accessibilityNotice.enableAndRestart.label
-# e10s.accessibilityNotice.enableAndRestart.accesskey
+# LOCALIZATION NOTE (e10s.accessibilityNotice.mainMessage,
+# e10s.accessibilityNotice.enableAndRestart.label,
+# e10s.accessibilityNotice.enableAndRestart.accesskey):
# These strings are related to the messages we display to offer e10s (Multi-process) to users
# on the pre-release channels. They won't be used in release but they will likely be used in
# beta starting from version 41, so it's still useful to have these strings properly localized.
# %S is brandShortName
-e10s.offerPopup.mainMessage = Multi-process is coming soon to %S. You can start using it now to get early access to some of the benefits:
-e10s.offerPopup.highlight1 = Improved responsiveness
-e10s.offerPopup.highlight2 = Fewer crashes
-e10s.offerPopup.enableAndRestart.label = Enable and Restart
-e10s.offerPopup.enableAndRestart.accesskey = E
-e10s.offerPopup.noThanks.label = No, thanks
-e10s.offerPopup.noThanks.accesskey = N
e10s.accessibilityNotice.mainMessage2 = Accessibility support is partially disabled due to compatibility issues with new %S features.
e10s.accessibilityNotice.acceptButton.label = OK
e10s.accessibilityNotice.acceptButton.accesskey = O
e10s.accessibilityNotice.enableAndRestart.label = Enable (Requires Restart)
e10s.accessibilityNotice.enableAndRestart.accesskey = E
# LOCALIZATION NOTE (usercontext.personal.label,
# usercontext.work.label,
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -170,13 +170,8 @@ syncUnlinkConfirm.label=Unlink
featureEnableRequiresRestart=%S must restart to enable this feature.
featureDisableRequiresRestart=%S must restart to disable this feature.
shouldRestartTitle=Restart %S
okToRestartButton=Restart %S now
revertNoRestartButton=Revert
restartNow=Restart Now
restartLater=Restart Later
-
-#### e10S
-# LOCALIZATION NOTE (e10sFeedbackAfterRestart): This message appears when the user
-# unchecks "Enable multi-process" on the "General" preferences tab.
-e10sFeedbackAfterRestart=After restart, a tab will open to input.mozilla.org where you can provide us feedback about your e10s experience.
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -10,21 +10,16 @@ import time
from copy import deepcopy
from mozprofile import Profile
from mozrunner import Runner
class GeckoInstance(object):
required_prefs = {
- "browser.displayedE10SPrompt.1": 5,
- "browser.displayedE10SPrompt.2": 5,
- "browser.displayedE10SPrompt.3": 5,
- "browser.displayedE10SPrompt.4": 5,
- "browser.displayedE10SPrompt": 5,
"browser.sessionstore.resume_from_crash": False,
"browser.shell.checkDefaultBrowser": False,
"browser.startup.page": 0,
"browser.tabs.remote.autostart.1": False,
"browser.tabs.remote.autostart.2": False,
"browser.tabs.remote.autostart": False,
"browser.urlbar.userMadeSearchSuggestionsChoice": True,
"browser.warnOnQuit": False,
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -305,18 +305,16 @@ user_pref("browser.selfsupport.url", "ht
user_pref("media.eme.enabled", true);
user_pref("media.autoplay.enabled", true);
#if defined(XP_WIN)
user_pref("media.decoder.heuristic.dormant.timeout", 0);
#endif
-// Don't prompt about e10s
-user_pref("browser.displayedE10SPrompt.1", 5);
// Don't use auto-enabled e10s
user_pref("browser.tabs.remote.autostart.1", false);
user_pref("browser.tabs.remote.autostart.2", false);
// Don't forceably kill content processes after a timeout
user_pref("dom.ipc.tabs.shutdownTimeoutSecs", 0);
// Don't block add-ons for e10s
user_pref("extensions.e10sBlocksEnabling", false);
--- a/testing/talos/talos/config.py
+++ b/testing/talos/talos/config.py
@@ -165,22 +165,16 @@ DEFAULTS = dict(
'browser.webapps.checkForUpdates': 0,
'browser.search.geoSpecificDefaults': False,
'browser.snippets.enabled': False,
'browser.snippets.syncPromo.enabled': False,
'toolkit.telemetry.server': 'https://127.0.0.1/telemetry-dummy/',
'experiments.manifest.uri':
'https://127.0.0.1/experiments-dummy/manifest',
'network.http.speculative-parallel-limit': 0,
- 'browser.displayedE10SPrompt': 9999,
- 'browser.displayedE10SPrompt.1': 9999,
- 'browser.displayedE10SPrompt.2': 9999,
- 'browser.displayedE10SPrompt.3': 9999,
- 'browser.displayedE10SPrompt.4': 9999,
- 'browser.displayedE10SPrompt.5': 9999,
'app.update.badge': False,
'lightweightThemes.selectedThemeID': "",
'devtools.webide.widget.enabled': False,
'devtools.webide.widget.inNavbarByDefault': False,
'devtools.chrome.enabled': False,
'devtools.debugger.remote-enabled': False,
'devtools.theme': "light",
'devtools.timeline.enabled': False,
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -8812,21 +8812,16 @@
"bug_numbers": [1241294],
"description": "Why e10s is enabled or disabled (0=ENABLED_BY_USER, 1=ENABLED_BY_DEFAULT, 2=DISABLED_BY_USER, 3=DISABLED_IN_SAFE_MODE, 4=DISABLED_FOR_ACCESSIBILITY, 5=DISABLED_FOR_MAC_GFX, 6=DISABLED_FOR_BIDI, 7=DISABLED_FOR_ADDONS)"
},
"E10S_WINDOW": {
"expires_in_version": "never",
"kind": "boolean",
"description": "Whether a browser window is set as an e10s window"
},
- "E10S_STILL_ACCEPTED_FROM_PROMPT": {
- "expires_in_version": "never",
- "kind": "boolean",
- "description": "Whether a user who accepted e10s from the prompt is still using e10s"
- },
"E10S_BLOCKED_FROM_RUNNING": {
"expires_in_version": "never",
"kind": "boolean",
"description": "Whether the e10s pref was set but it was blocked from running due to blacklisted conditions"
},
"E10S_ADDONS_BLOCKER_RAN": {
"alert_emails": ["firefox-dev@mozilla.org"],
"expires_in_version": "49",
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4867,20 +4867,16 @@ mozilla::BrowserTabsRemoteAutostart()
Preferences::GetBool(kForceDisableE10sPref, false)) {
gBrowserTabsRemoteAutostart = false;
status = kE10sForceDisabled;
}
gBrowserTabsRemoteStatus = status;
mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_STATUS, status);
- if (Preferences::GetBool("browser.enabledE10SFromPrompt", false)) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_STILL_ACCEPTED_FROM_PROMPT,
- gBrowserTabsRemoteAutostart);
- }
if (prefEnabled) {
mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_BLOCKED_FROM_RUNNING,
!gBrowserTabsRemoteAutostart);
}
if (Preferences::HasUserValue("extensions.e10sBlockedByAddons")) {
mozilla::Telemetry::Accumulate(mozilla::Telemetry::E10S_ADDONS_BLOCKER_RAN, true);
}
return gBrowserTabsRemoteAutostart;