Bug 1236926 - Remove _showE10sActivatedNotice. r=felipc

This commit is contained in:
Gabor Krizsanits 2016-01-14 09:42:52 +01:00
Родитель 8d1fe3d9e0
Коммит b8ba404554
3 изменённых файлов: 1 добавлений и 54 удалений

Просмотреть файл

@ -2974,9 +2974,6 @@ var DefaultBrowserCheck = {
#ifdef E10S_TESTING_ONLY
var E10SUINotification = {
// Increase this number each time we want to roll out an
// e10s testing period to Nightly users.
CURRENT_NOTICE_COUNT: 4,
CURRENT_PROMPT_PREF: "browser.displayedE10SPrompt.1",
PREVIOUS_PROMPT_PREF: "browser.displayedE10SPrompt",
@ -3007,20 +3004,7 @@ var E10SUINotification = {
return;
}
if (Services.appinfo.browserTabsRemoteAutostart) {
if (this.forcedOn) {
return;
}
let notice = 0;
try {
notice = Services.prefs.getIntPref("browser.displayedE10SNotice");
} catch(e) {}
let activationNoticeShown = notice >= this.CURRENT_NOTICE_COUNT;
if (!activationNoticeShown) {
this._showE10sActivatedNotice();
}
} else {
if (!Services.appinfo.browserTabsRemoteAutostart) {
let displayFeedbackRequest = false;
try {
displayFeedbackRequest = Services.prefs.getBoolPref("browser.requestE10sFeedback");
@ -3032,10 +3016,6 @@ var E10SUINotification = {
return;
}
// The user has just voluntarily disabled e10s. Subtract one from displayedE10SNotice
// so that the next time e10s is activated (either by the user or forced by us), they
// can see the notice again.
Services.prefs.setIntPref("browser.displayedE10SNotice", this.CURRENT_NOTICE_COUNT - 1);
Services.prefs.clearUserPref("browser.requestE10sFeedback");
let url = Services.urlFormatter.formatURLPref("app.feedback.baseURL");
@ -3084,32 +3064,6 @@ var E10SUINotification = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
_showE10sActivatedNotice: function() {
let win = RecentWindow.getMostRecentBrowserWindow();
if (!win)
return;
Services.prefs.setIntPref("browser.displayedE10SNotice", this.CURRENT_NOTICE_COUNT);
let nb = win.document.getElementById("high-priority-global-notificationbox");
let message = win.gNavigatorBundle.getFormattedString(
"e10s.postActivationInfobar.message",
[gBrandBundle.GetStringFromName("brandShortName")]
);
let buttons = [
{
label: win.gNavigatorBundle.getString("e10s.postActivationInfobar.learnMore.label"),
accessKey: win.gNavigatorBundle.getString("e10s.postActivationInfobar.learnMore.accesskey"),
callback: function () {
win.openUILinkIn("https://wiki.mozilla.org/Electrolysis", "tab");
}
}
];
nb.appendNotification(message, "e10s-activated-noticed",
null, nb.PRIORITY_WARNING_MEDIUM, buttons);
},
_showE10SPrompt: function BG__showE10SPrompt() {
let win = RecentWindow.getMostRecentBrowserWindow();
if (!win)

Просмотреть файл

@ -746,9 +746,6 @@ appMenuRemoteTabs.mobilePromo.ios = Firefox for iOS
# e10s.offerPopup.enableAndRestart.accesskey
# e10s.offerPopup.noThanks.label
# e10s.offerPopup.noThanks.accesskey
# e10s.postActivationInfobar.message
# e10s.postActivationInfobar.learnMore.label
# e10s.postActivationInfobar.learnMore.accesskey
# e10s.accessibilityNotice.mainMessage
# e10s.accessibilityNotice.enableAndRestart.label
# e10s.accessibilityNotice.enableAndRestart.accesskey
@ -763,9 +760,6 @@ e10s.offerPopup.enableAndRestart.label = Enable and Restart
e10s.offerPopup.enableAndRestart.accesskey = E
e10s.offerPopup.noThanks.label = No, thanks
e10s.offerPopup.noThanks.accesskey = N
e10s.postActivationInfobar.message = You're now helping to test multi-process in %S! Please report problems you find.
e10s.postActivationInfobar.learnMore.label = Learn More
e10s.postActivationInfobar.learnMore.accesskey = L
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

Просмотреть файл

@ -310,7 +310,6 @@ user_pref("media.decoder.heuristic.dormant.timeout", 0);
#endif
// Don't prompt about e10s
user_pref("browser.displayedE10SNotice", 5);
user_pref("browser.displayedE10SPrompt.1", 5);
// Don't use auto-enabled e10s
user_pref("browser.tabs.remote.autostart.1", false);