Bug 1322720 - don't show the homepage on firstrun if a pref is flipped, r=dao

MozReview-Commit-ID: FhWyo7omun3

--HG--
extra : rebase_source : 4f214431322cd1fb8b39c0f4a2b873dbce8ff593
This commit is contained in:
Gijs Kruitbosch 2016-12-15 15:40:50 +00:00
parent b42dfe45bd
commit c38d38f381
2 changed files with 7 additions and 2 deletions

View File

@ -216,6 +216,8 @@ pref("browser.shell.defaultBrowserCheckCount", 0);
// The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
pref("browser.startup.page", 1);
pref("browser.startup.homepage", "chrome://branding/locale/browserconfig.properties");
// Whether we should skip the homepage when opening the first-run page
pref("browser.startup.firstrunSkipsHomepage", false);
pref("browser.slowStartup.notificationDisabled", false);
pref("browser.slowStartup.timeThreshold", 40000);

View File

@ -551,8 +551,11 @@ nsBrowserContentHandler.prototype = {
if (startPage == "about:blank")
startPage = "";
// Only show the startPage if we're not restoring an update session.
if (overridePage && startPage && !willRestoreSession)
let skipStartPage = override == OVERRIDE_NEW_PROFILE &&
prefb.getBoolPref("browser.startup.firstrunSkipsHomepage");
// Only show the startPage if we're not restoring an update session and are
// not set to skip the start page on this profile
if (overridePage && startPage && !willRestoreSession && !skipStartPage)
return overridePage + "|" + startPage;
return overridePage || startPage || "about:blank";