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