From b23bb0744f55f165f394483c5167a94815161147 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Fri, 10 Jul 2009 22:37:47 +0000 Subject: Instead of forcing the homepage to be linux splash, force the startup action to be "view linux splash page". Thus users can still use the home button until we get rid of the splash page. BUG=16308 TEST=none. Review URL: http://codereview.chromium.org/149481 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20427 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_main.cc | 13 +++++++++++++ chrome/browser/profile.cc | 6 ------ 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 4907ebb..bf11fb4 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -70,6 +70,8 @@ #if defined(OS_LINUX) #include "chrome/app/breakpad_linux.h" +// TODO(estade): remove this when the linux splash is removed. +#include "chrome/browser/session_startup_pref.h" #endif // TODO(port): several win-only methods have been pulled out of this, but @@ -533,6 +535,17 @@ int BrowserMain(const MainFunctionParams& parameters) { // services aware of all our preferences. browser::RegisterAllPrefs(user_prefs, local_state); +#if defined(OS_LINUX) + // UI tests expect that the browser will show the home page on startup. + if (!parsed_command_line.HasSwitch(switches::kHomePage)) { + // TODO(port): Remove ifdef when the Linux splash page is not needed. + SessionStartupPref startup_pref = + SessionStartupPref(SessionStartupPref::URLS); + startup_pref.urls.push_back(GURL("about:linux-splash")); + SessionStartupPref::SetStartupPref(profile, startup_pref); + } +#endif + // Now that all preferences have been registered, set the install date // for the uninstall metrics if this is our first run. This only actually // gets used if the user has metrics reporting enabled at uninstall time. diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index df95acf..16a93f4 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -522,12 +522,6 @@ ProfileImpl::ProfileImpl(const FilePath& path) blacklist_ = new Blacklist(path); } -#if defined(OS_LINUX) - // TODO(port): Remove ifdef when the Linux splash page is not needed. - prefs->transient()->SetString(prefs::kHomePage, "about:linux-splash"); - prefs->transient()->SetBoolean(prefs::kHomePageIsNewTabPage, false); -#endif - // Listen for theme installation. registrar_.Add(this, NotificationType::THEME_INSTALLED, NotificationService::AllSources()); -- cgit v1.1