summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-21 17:41:16 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-21 17:41:16 +0000
commit8da1fa0d697791cbfc2415f6352be13b7c9c685b (patch)
tree6eb0de9df326f819570c2c94dfc9cb9e75daf0a4 /chrome/browser/browser_init.cc
parent6a939dc42610b8e79b45e9107a64c3aab916c85b (diff)
downloadchromium_src-8da1fa0d697791cbfc2415f6352be13b7c9c685b.zip
chromium_src-8da1fa0d697791cbfc2415f6352be13b7c9c685b.tar.gz
chromium_src-8da1fa0d697791cbfc2415f6352be13b7c9c685b.tar.bz2
Reverting r26698. Somehow this broke scons?
TBR=stuartmorgan Review URL: http://codereview.chromium.org/217004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26699 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 26e6db5..1f0f5b1 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -443,6 +443,30 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile,
browser = BrowserList::GetLastActive();
OpenURLsInBrowser(browser, process_startup, urls_to_open);
}
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(TOOLKIT_VIEWS)
+ // 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) &&
+ GetURLsFromCommandLine(profile_).empty()) {
+ Browser* browser = BrowserList::GetLastActive();
+ if (browser) {
+ // 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 (process_startup &&
!command_line_.HasSwitch(switches::kNoDefaultBrowserCheck))