diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 23:43:48 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 23:43:48 +0000 |
commit | 0bfff0758445c1b0abdb0deff3dfb8aa5b2229e3 (patch) | |
tree | de50ea7a99d42e5fdc95b710ad714d649a45a788 /chrome/browser/browser_init.cc | |
parent | 9adda5ced8f9f3ce5fda4f678911dca98fd73c8a (diff) | |
download | chromium_src-0bfff0758445c1b0abdb0deff3dfb8aa5b2229e3.zip chromium_src-0bfff0758445c1b0abdb0deff3dfb8aa5b2229e3.tar.gz chromium_src-0bfff0758445c1b0abdb0deff3dfb8aa5b2229e3.tar.bz2 |
Don't clobber the previous session when showing about-linux splash page.
BUG=16599
TEST=previous session should restore + linux splash page
Review URL: http://codereview.chromium.org/149555
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r-- | chrome/browser/browser_init.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index fdb85ea..3f3906f 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -436,6 +436,27 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, browser = BrowserList::GetLastActive(); OpenURLsInBrowser(browser, process_startup, urls_to_open); } +#if defined(OS_LINUX) + // TODO(port): Remove ifdef when the Linux splash page is not needed. + const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); + // This can mess up UI tests, so only do it when UI tests aren't running. + if (!parsed_command_line.HasSwitch(switches::kHomePage)) { + Browser* browser = BrowserList::GetLastActive(); + // Only show the splash page if it isn't already showing. + bool open_splash = true; + for (int i = 0; i < browser->tab_count(); ++i) { + if (browser->GetTabContentsAt(i)->GetURL().spec() == + "about:linux-splash") { + open_splash = false; + } + } + + if (open_splash) { + browser->OpenURL(GURL("about:linux-splash"), GURL(), + NEW_FOREGROUND_TAB, PageTransition::START_PAGE); + } + } +#endif // Check whether we are the default browser. if (!command_line_.HasSwitch(switches::kNoDefaultBrowserCheck)) CheckDefaultBrowser(profile); |