mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
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 --HG-- extra : rebase_source : e89cc42dddcb376bece435138611b364d3477fa8
This commit is contained in:
parent
f452b33559
commit
918237b0ca
@ -37,9 +37,6 @@ DEFAULT_COMMON_PREFS = {
|
||||
# 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 = {
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"browser.displayedE10SPrompt.1": 5,
|
||||
"browser.tabs.remote.autostart": false,
|
||||
"browser.tabs.remote.autostart.1": false,
|
||||
"browser.tabs.remote.autostart.2": false
|
||||
|
@ -76,12 +76,6 @@
|
||||
</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"/>
|
||||
|
@ -117,11 +117,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "SimpleServiceDiscovery",
|
||||
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) {
|
||||
@ -2996,154 +2991,6 @@ var DefaultBrowserCheck = {
|
||||
},
|
||||
};
|
||||
|
||||
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);
|
||||
|
@ -161,12 +161,6 @@ var gMainPane = {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -691,27 +691,13 @@ appMenuRemoteTabs.mobilePromo.text2 = Download %1$S or %2$S and connect them to
|
||||
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
|
||||
|
@ -175,8 +175,3 @@ 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.
|
||||
|
@ -15,11 +15,6 @@ 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,
|
||||
|
@ -310,8 +310,6 @@ user_pref("media.autoplay.enabled", true);
|
||||
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);
|
||||
|
@ -170,12 +170,6 @@ DEFAULTS = dict(
|
||||
'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,
|
||||
|
@ -8818,11 +8818,6 @@
|
||||
"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",
|
||||
|
@ -4872,10 +4872,6 @@ mozilla::BrowserTabsRemoteAutostart()
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user