Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1238)

Side by Side Diff: chrome/browser/browser_init.cc

Issue 211036: Linux: Remove linux splash page and printing command line switch.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <algorithm> 7 #include <algorithm>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include "app/win_util.h" 10 #include "app/win_util.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // the home pages if no additional URLs were passed on the command line. 436 // the home pages if no additional URLs were passed on the command line.
437 if (!OpenStartupURLs(process_startup, urls_to_open)) { 437 if (!OpenStartupURLs(process_startup, urls_to_open)) {
438 // Add the home page and any special first run URLs. 438 // Add the home page and any special first run URLs.
439 Browser* browser = NULL; 439 Browser* browser = NULL;
440 if (urls_to_open.empty()) 440 if (urls_to_open.empty())
441 AddStartupURLs(&urls_to_open); 441 AddStartupURLs(&urls_to_open);
442 else 442 else
443 browser = BrowserList::GetLastActive(); 443 browser = BrowserList::GetLastActive();
444 OpenURLsInBrowser(browser, process_startup, urls_to_open); 444 OpenURLsInBrowser(browser, process_startup, urls_to_open);
445 } 445 }
446 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(TOOLKIT_VIEWS)
447 // TODO(port): Remove ifdef when the Linux splash page is not needed.
448 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
449 // This can mess up UI tests, so only do it when UI tests aren't running.
450 if (!parsed_command_line.HasSwitch(switches::kHomePage) &&
451 GetURLsFromCommandLine(profile_).empty()) {
452 Browser* browser = BrowserList::GetLastActive();
453 if (browser) {
454 // Only show the splash page if it isn't already showing.
455 bool open_splash = true;
456 for (int i = 0; i < browser->tab_count(); ++i) {
457 if (browser->GetTabContentsAt(i)->GetURL().spec() ==
458 "about:linux-splash") {
459 open_splash = false;
460 }
461 }
462
463 if (open_splash) {
464 browser->OpenURL(GURL("about:linux-splash"), GURL(),
465 NEW_FOREGROUND_TAB, PageTransition::START_PAGE);
466 }
467 }
468 }
469 #endif
470 // Check whether we are the default browser. 446 // Check whether we are the default browser.
471 if (process_startup && 447 if (process_startup &&
472 !command_line_.HasSwitch(switches::kNoDefaultBrowserCheck)) 448 !command_line_.HasSwitch(switches::kNoDefaultBrowserCheck))
473 CheckDefaultBrowser(profile); 449 CheckDefaultBrowser(profile);
474 } else { 450 } else {
475 RecordLaunchModeHistogram(LM_AS_WEBAPP); 451 RecordLaunchModeHistogram(LM_AS_WEBAPP);
476 } 452 }
477 453
478 #if defined(OS_WIN) 454 #if defined(OS_WIN)
479 // Print the selected page if the command line switch exists. Note that the 455 // Print the selected page if the command line switch exists. Note that the
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 scoped_refptr<AutomationProviderClass> automation = 836 scoped_refptr<AutomationProviderClass> automation =
861 new AutomationProviderClass(profile); 837 new AutomationProviderClass(profile);
862 automation->ConnectToChannel(channel_id); 838 automation->ConnectToChannel(channel_id);
863 automation->SetExpectedTabCount(expected_tabs); 839 automation->SetExpectedTabCount(expected_tabs);
864 840
865 AutomationProviderList* list = 841 AutomationProviderList* list =
866 g_browser_process->InitAutomationProviderList(); 842 g_browser_process->InitAutomationProviderList();
867 DCHECK(list); 843 DCHECK(list);
868 list->AddProvider(automation); 844 list->AddProvider(automation);
869 } 845 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698