| 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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 } | 1197 } |
| 1198 BrowserThread::PostTask( | 1198 BrowserThread::PostTask( |
| 1199 BrowserThread::FILE, FROM_HERE, new CheckDefaultBrowserTask()); | 1199 BrowserThread::FILE, FROM_HERE, new CheckDefaultBrowserTask()); |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 std::vector<GURL> BrowserInit::GetURLsFromCommandLine( | 1202 std::vector<GURL> BrowserInit::GetURLsFromCommandLine( |
| 1203 const CommandLine& command_line, | 1203 const CommandLine& command_line, |
| 1204 const FilePath& cur_dir, | 1204 const FilePath& cur_dir, |
| 1205 Profile* profile) { | 1205 Profile* profile) { |
| 1206 std::vector<GURL> urls; | 1206 std::vector<GURL> urls; |
| 1207 const std::vector<CommandLine::StringType>& params = command_line.args(); | 1207 CommandLine::StringVector params = command_line.args(); |
| 1208 | 1208 |
| 1209 for (size_t i = 0; i < params.size(); ++i) { | 1209 for (size_t i = 0; i < params.size(); ++i) { |
| 1210 FilePath param = FilePath(params[i]); | 1210 FilePath param = FilePath(params[i]); |
| 1211 // Handle Vista way of searching - "? <search-term>" | 1211 // Handle Vista way of searching - "? <search-term>" |
| 1212 if (param.value().size() > 2 && | 1212 if (param.value().size() > 2 && |
| 1213 param.value()[0] == '?' && param.value()[1] == ' ') { | 1213 param.value()[0] == '?' && param.value()[1] == ' ') { |
| 1214 const TemplateURL* default_provider = | 1214 const TemplateURL* default_provider = |
| 1215 profile->GetTemplateURLModel()->GetDefaultSearchProvider(); | 1215 profile->GetTemplateURLModel()->GetDefaultSearchProvider(); |
| 1216 if (default_provider && default_provider->url()) { | 1216 if (default_provider && default_provider->url()) { |
| 1217 const TemplateURLRef* search_url = default_provider->url(); | 1217 const TemplateURLRef* search_url = default_provider->url(); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1397 return false; | 1397 return false; |
| 1398 automation->SetExpectedTabCount(expected_tabs); | 1398 automation->SetExpectedTabCount(expected_tabs); |
| 1399 | 1399 |
| 1400 AutomationProviderList* list = | 1400 AutomationProviderList* list = |
| 1401 g_browser_process->InitAutomationProviderList(); | 1401 g_browser_process->InitAutomationProviderList(); |
| 1402 DCHECK(list); | 1402 DCHECK(list); |
| 1403 list->AddProvider(automation); | 1403 list->AddProvider(automation); |
| 1404 | 1404 |
| 1405 return true; | 1405 return true; |
| 1406 } | 1406 } |
| OLD | NEW |