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

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

Issue 113444: Open a new tab page if the "Open the following pages" option is speified... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 7 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 | « no previous file | no next file » | 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 23 matching lines...) Expand all
34 #include "chrome/browser/tab_contents/navigation_controller.h" 34 #include "chrome/browser/tab_contents/navigation_controller.h"
35 #include "chrome/browser/tab_contents/tab_contents.h" 35 #include "chrome/browser/tab_contents/tab_contents.h"
36 #include "chrome/browser/tab_contents/tab_contents_view.h" 36 #include "chrome/browser/tab_contents/tab_contents_view.h"
37 #include "chrome/browser/net/url_fixer_upper.h" 37 #include "chrome/browser/net/url_fixer_upper.h"
38 #include "chrome/common/chrome_constants.h" 38 #include "chrome/common/chrome_constants.h"
39 #include "chrome/common/chrome_paths.h" 39 #include "chrome/common/chrome_paths.h"
40 #include "chrome/common/chrome_switches.h" 40 #include "chrome/common/chrome_switches.h"
41 #include "chrome/common/pref_names.h" 41 #include "chrome/common/pref_names.h"
42 #include "chrome/common/pref_service.h" 42 #include "chrome/common/pref_service.h"
43 #include "chrome/common/result_codes.h" 43 #include "chrome/common/result_codes.h"
44 #include "chrome/common/url_constants.h"
44 #include "grit/chromium_strings.h" 45 #include "grit/chromium_strings.h"
45 #include "grit/generated_resources.h" 46 #include "grit/generated_resources.h"
46 #include "grit/locale_settings.h" 47 #include "grit/locale_settings.h"
47 #include "grit/theme_resources.h" 48 #include "grit/theme_resources.h"
48 #include "net/base/cookie_monster.h" 49 #include "net/base/cookie_monster.h"
49 #include "webkit/glue/webkit_glue.h" 50 #include "webkit/glue/webkit_glue.h"
50 51
51 #if defined(OS_WIN) 52 #if defined(OS_WIN)
52 #include "base/win_util.h" 53 #include "base/win_util.h"
53 #endif 54 #endif
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 // infobar. 483 // infobar.
483 return false; 484 return false;
484 } 485 }
485 SessionRestore::RestoreSessionSynchronously(profile_, urls_to_open); 486 SessionRestore::RestoreSessionSynchronously(profile_, urls_to_open);
486 return true; 487 return true;
487 488
488 case SessionStartupPref::URLS: 489 case SessionStartupPref::URLS:
489 // When the user launches the app only open the default set of URLs if 490 // When the user launches the app only open the default set of URLs if
490 // we aren't going to open any URLs on the command line. 491 // we aren't going to open any URLs on the command line.
491 if (urls_to_open.empty()) { 492 if (urls_to_open.empty()) {
492 if (pref.urls.empty()) 493 if (pref.urls.empty()) {
493 return false; // No URLs to open. 494 // Open a New Tab page.
495 std::vector<GURL> urls;
496 urls.push_back(GURL(chrome::kChromeUINewTabURL));
497 OpenURLsInBrowser(NULL, is_process_startup, urls);
498 return true;
499 }
494 OpenURLsInBrowser(NULL, is_process_startup, pref.urls); 500 OpenURLsInBrowser(NULL, is_process_startup, pref.urls);
495 return true; 501 return true;
496 } 502 }
497 return false; 503 return false;
498 504
499 default: 505 default:
500 return false; 506 return false;
501 } 507 }
502 } 508 }
503 509
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 scoped_refptr<AutomationProviderClass> automation = 735 scoped_refptr<AutomationProviderClass> automation =
730 new AutomationProviderClass(profile); 736 new AutomationProviderClass(profile);
731 automation->ConnectToChannel(channel_id); 737 automation->ConnectToChannel(channel_id);
732 automation->SetExpectedTabCount(expected_tabs); 738 automation->SetExpectedTabCount(expected_tabs);
733 739
734 AutomationProviderList* list = 740 AutomationProviderList* list =
735 g_browser_process->InitAutomationProviderList(); 741 g_browser_process->InitAutomationProviderList();
736 DCHECK(list); 742 DCHECK(list);
737 list->AddProvider(automation); 743 list->AddProvider(automation);
738 } 744 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698