| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/browser_init.h" | 5 #include "chrome/browser/browser_init.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include "app/win_util.h" | 8 #include "app/win_util.h" |
| 9 #endif | 9 #endif |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 if (urls_to_open.empty()) | 434 if (urls_to_open.empty()) |
| 435 AddStartupURLs(&urls_to_open); | 435 AddStartupURLs(&urls_to_open); |
| 436 else | 436 else |
| 437 browser = BrowserList::GetLastActive(); | 437 browser = BrowserList::GetLastActive(); |
| 438 OpenURLsInBrowser(browser, process_startup, urls_to_open); | 438 OpenURLsInBrowser(browser, process_startup, urls_to_open); |
| 439 } | 439 } |
| 440 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 440 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 441 // TODO(port): Remove ifdef when the Linux splash page is not needed. | 441 // TODO(port): Remove ifdef when the Linux splash page is not needed. |
| 442 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 442 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
| 443 // This can mess up UI tests, so only do it when UI tests aren't running. | 443 // This can mess up UI tests, so only do it when UI tests aren't running. |
| 444 if (!parsed_command_line.HasSwitch(switches::kHomePage)) { | 444 if (!parsed_command_line.HasSwitch(switches::kHomePage) && |
| 445 GetURLsFromCommandLine(profile_).empty()) { |
| 445 Browser* browser = BrowserList::GetLastActive(); | 446 Browser* browser = BrowserList::GetLastActive(); |
| 446 // Only show the splash page if it isn't already showing. | 447 // Only show the splash page if it isn't already showing. |
| 447 bool open_splash = true; | 448 bool open_splash = true; |
| 448 for (int i = 0; i < browser->tab_count(); ++i) { | 449 for (int i = 0; i < browser->tab_count(); ++i) { |
| 449 if (browser->GetTabContentsAt(i)->GetURL().spec() == | 450 if (browser->GetTabContentsAt(i)->GetURL().spec() == |
| 450 "about:linux-splash") { | 451 "about:linux-splash") { |
| 451 open_splash = false; | 452 open_splash = false; |
| 452 } | 453 } |
| 453 } | 454 } |
| 454 | 455 |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 scoped_refptr<AutomationProviderClass> automation = | 830 scoped_refptr<AutomationProviderClass> automation = |
| 830 new AutomationProviderClass(profile); | 831 new AutomationProviderClass(profile); |
| 831 automation->ConnectToChannel(channel_id); | 832 automation->ConnectToChannel(channel_id); |
| 832 automation->SetExpectedTabCount(expected_tabs); | 833 automation->SetExpectedTabCount(expected_tabs); |
| 833 | 834 |
| 834 AutomationProviderList* list = | 835 AutomationProviderList* list = |
| 835 g_browser_process->InitAutomationProviderList(); | 836 g_browser_process->InitAutomationProviderList(); |
| 836 DCHECK(list); | 837 DCHECK(list); |
| 837 list->AddProvider(automation); | 838 list->AddProvider(automation); |
| 838 } | 839 } |
| OLD | NEW |