OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/browser_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
6 | 6 |
7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
8 | 8 |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/event_recorder.h" | 10 #include "base/event_recorder.h" |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 } | 1039 } |
1040 BrowserThread::PostTask( | 1040 BrowserThread::PostTask( |
1041 BrowserThread::FILE, FROM_HERE, new CheckDefaultBrowserTask()); | 1041 BrowserThread::FILE, FROM_HERE, new CheckDefaultBrowserTask()); |
1042 } | 1042 } |
1043 | 1043 |
1044 std::vector<GURL> BrowserInit::GetURLsFromCommandLine( | 1044 std::vector<GURL> BrowserInit::GetURLsFromCommandLine( |
1045 const CommandLine& command_line, | 1045 const CommandLine& command_line, |
1046 const FilePath& cur_dir, | 1046 const FilePath& cur_dir, |
1047 Profile* profile) { | 1047 Profile* profile) { |
1048 std::vector<GURL> urls; | 1048 std::vector<GURL> urls; |
1049 const std::vector<CommandLine::StringType>& params = command_line.args(); | 1049 std::vector<CommandLine::StringType> params = command_line.args(); |
1050 | 1050 |
1051 for (size_t i = 0; i < params.size(); ++i) { | 1051 for (size_t i = 0; i < params.size(); ++i) { |
1052 FilePath param = FilePath(params[i]); | 1052 FilePath param = FilePath(params[i]); |
1053 // Handle Vista way of searching - "? <search-term>" | 1053 // Handle Vista way of searching - "? <search-term>" |
1054 if (param.value().find(FILE_PATH_LITERAL("? ")) == 0) { | 1054 if (param.value().find(FILE_PATH_LITERAL("? ")) == 0) { |
1055 const TemplateURL* default_provider = | 1055 const TemplateURL* default_provider = |
1056 profile->GetTemplateURLModel()->GetDefaultSearchProvider(); | 1056 profile->GetTemplateURLModel()->GetDefaultSearchProvider(); |
1057 if (!default_provider || !default_provider->url()) { | 1057 if (!default_provider || !default_provider->url()) { |
1058 // No search provider available. Just treat this as regular URL. | 1058 // No search provider available. Just treat this as regular URL. |
1059 urls.push_back(URLFixerUpper::FixupRelativeFile(cur_dir, param)); | 1059 urls.push_back(URLFixerUpper::FixupRelativeFile(cur_dir, param)); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 return false; | 1237 return false; |
1238 automation->SetExpectedTabCount(expected_tabs); | 1238 automation->SetExpectedTabCount(expected_tabs); |
1239 | 1239 |
1240 AutomationProviderList* list = | 1240 AutomationProviderList* list = |
1241 g_browser_process->InitAutomationProviderList(); | 1241 g_browser_process->InitAutomationProviderList(); |
1242 DCHECK(list); | 1242 DCHECK(list); |
1243 list->AddProvider(automation); | 1243 list->AddProvider(automation); |
1244 | 1244 |
1245 return true; | 1245 return true; |
1246 } | 1246 } |
OLD | NEW |