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

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

Issue 2013008: Remove --omnibox-popup-count flag. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: nits Created 10 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
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/common/chrome_switches.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/event_recorder.h" 9 #include "base/event_recorder.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 } 891 }
892 892
893 bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line, 893 bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
894 const std::wstring& cur_dir, 894 const std::wstring& cur_dir,
895 bool process_startup, 895 bool process_startup,
896 Profile* profile, 896 Profile* profile,
897 int* return_code, 897 int* return_code,
898 BrowserInit* browser_init) { 898 BrowserInit* browser_init) {
899 DCHECK(profile); 899 DCHECK(profile);
900 if (process_startup) { 900 if (process_startup) {
901 const std::string popup_count_string =
902 command_line.GetSwitchValueASCII(switches::kOmniBoxPopupCount);
903 if (!popup_count_string.empty()) {
904 int count = 0;
905 if (StringToInt(popup_count_string, &count)) {
906 const int popup_count = std::max(0, count);
907 AutocompleteResult::set_max_matches(popup_count);
908 AutocompleteProvider::set_max_matches(popup_count / 2);
909 }
910 }
911
912 if (command_line.HasSwitch(switches::kDisablePromptOnRepost)) 901 if (command_line.HasSwitch(switches::kDisablePromptOnRepost))
913 NavigationController::DisablePromptOnRepost(); 902 NavigationController::DisablePromptOnRepost();
914 903
915 const std::string tab_count_string = command_line.GetSwitchValueASCII( 904 const std::string tab_count_string = command_line.GetSwitchValueASCII(
916 switches::kTabCountToLoadOnSessionRestore); 905 switches::kTabCountToLoadOnSessionRestore);
917 if (!tab_count_string.empty()) { 906 if (!tab_count_string.empty()) {
918 int count = 0; 907 int count = 0;
919 if (StringToInt(tab_count_string, &count)) { 908 if (StringToInt(tab_count_string, &count)) {
920 const int tab_count = std::max(0, count); 909 const int tab_count = std::max(0, count);
921 SessionRestore::num_tabs_to_load_ = static_cast<size_t>(tab_count); 910 SessionRestore::num_tabs_to_load_ = static_cast<size_t>(tab_count);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 scoped_refptr<AutomationProviderClass> automation = 1050 scoped_refptr<AutomationProviderClass> automation =
1062 new AutomationProviderClass(profile); 1051 new AutomationProviderClass(profile);
1063 automation->ConnectToChannel(channel_id); 1052 automation->ConnectToChannel(channel_id);
1064 automation->SetExpectedTabCount(expected_tabs); 1053 automation->SetExpectedTabCount(expected_tabs);
1065 1054
1066 AutomationProviderList* list = 1055 AutomationProviderList* list =
1067 g_browser_process->InitAutomationProviderList(); 1056 g_browser_process->InitAutomationProviderList();
1068 DCHECK(list); 1057 DCHECK(list);
1069 list->AddProvider(automation); 1058 list->AddProvider(automation);
1070 } 1059 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698