Bug 1209140 - Open a second firstrun tab for Tracking Protection promotion. r=jaws

This commit is contained in:
Matthew Noorenberghe 2015-10-15 13:44:18 -07:00
parent ed03c968a2
commit c86c14f3aa
5 changed files with 25 additions and 11 deletions

View File

@ -4,8 +4,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
pref("startup.homepage_override_url","");
pref("startup.homepage_welcome_url","https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/firstrun/");
pref("startup.homepage_override_url", "");
pref("startup.homepage_welcome_url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/firstrun/");
pref("startup.homepage_welcome_url.additional", "");
// The time interval between checks for a new version (in seconds)
pref("app.update.interval", 28800); // 8 hours
// The time interval between the downloading of mar file chunks in the

View File

@ -4,6 +4,7 @@
pref("startup.homepage_override_url", "https://www.mozilla.org/projects/firefox/%VERSION%/whatsnew/?oldversion=%OLD_VERSION%");
pref("startup.homepage_welcome_url", "https://www.mozilla.org/projects/firefox/%VERSION%/firstrun/");
pref("startup.homepage_welcome_url.additional", "");
// The time interval between checks for a new version (in seconds)
pref("app.update.interval", 7200); // 2 hours
// The time interval between the downloading of mar file chunks in the

View File

@ -2,8 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
pref("startup.homepage_override_url","");
pref("startup.homepage_welcome_url","https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/firstrun/");
pref("startup.homepage_override_url", "");
pref("startup.homepage_welcome_url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/firstrun/");
pref("startup.homepage_welcome_url.additional", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/firstrun/learnmore/");
// Interval: Time between checks for a new version (in seconds)
pref("app.update.interval", 43200); // 12 hours
// The time interval between the downloading of mar file chunks in the

View File

@ -2,8 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
pref("startup.homepage_override_url","");
pref("startup.homepage_welcome_url","");
pref("startup.homepage_override_url", "");
pref("startup.homepage_welcome_url", "");
pref("startup.homepage_welcome_url.additional", "");
// The time interval between checks for a new version (in seconds)
pref("app.update.interval", 86400); // 24 hours
// The time interval between the downloading of mar file chunks in the

View File

@ -501,7 +501,9 @@ nsBrowserContentHandler.prototype = {
}
}
var override;
var overridePage = "";
var additionalPage = "";
var willRestoreSession = false;
try {
// Read the old value of homepage_override.mstone before
@ -513,12 +515,13 @@ nsBrowserContentHandler.prototype = {
try {
old_mstone = Services.prefs.getCharPref("browser.startup.homepage_override.mstone");
} catch (ex) {}
let override = needHomepageOverride(prefb);
override = needHomepageOverride(prefb);
if (override != OVERRIDE_NONE) {
switch (override) {
case OVERRIDE_NEW_PROFILE:
// New profile.
overridePage = Services.urlFormatter.formatURLPref("startup.homepage_welcome_url");
additionalPage = Services.urlFormatter.formatURLPref("startup.homepage_welcome_url.additional");
break;
case OVERRIDE_NEW_MSTONE:
// Check whether we will restore a session. If we will, we assume
@ -553,14 +556,21 @@ nsBrowserContentHandler.prototype = {
let firstUseOnWindows10URL = Services.urlFormatter.formatURLPref("browser.usedOnWindows10.introURL");
if (firstUseOnWindows10URL && firstUseOnWindows10URL.length) {
if (overridePage) {
overridePage += "|" + firstUseOnWindows10URL;
} else {
overridePage = firstUseOnWindows10URL;
additionalPage = firstUseOnWindows10URL;
if (override == OVERRIDE_NEW_PROFILE) {
additionalPage += "&utm_content=firstrun";
}
}
}
if (additionalPage && additionalPage != "about:blank") {
if (overridePage) {
overridePage += "|" + additionalPage;
} else {
overridePage = additionalPage;
}
}
var startPage = "";
try {
var choice = prefb.getIntPref("browser.startup.page");