| OLD | NEW |
| 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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include "app/win_util.h" | 8 #include "app/win_util.h" |
| 9 #endif | 9 #endif |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 profile->GetTemplateURLModel()->GetDefaultSearchProvider(); | 560 profile->GetTemplateURLModel()->GetDefaultSearchProvider(); |
| 561 if (!default_provider || !default_provider->url()) { | 561 if (!default_provider || !default_provider->url()) { |
| 562 // No search provider available. Just treat this as regular URL. | 562 // No search provider available. Just treat this as regular URL. |
| 563 urls.push_back( | 563 urls.push_back( |
| 564 GURL(WideToUTF8(URLFixerUpper::FixupRelativeFile(cur_dir_, | 564 GURL(WideToUTF8(URLFixerUpper::FixupRelativeFile(cur_dir_, |
| 565 value)))); | 565 value)))); |
| 566 continue; | 566 continue; |
| 567 } | 567 } |
| 568 const TemplateURLRef* search_url = default_provider->url(); | 568 const TemplateURLRef* search_url = default_provider->url(); |
| 569 DCHECK(search_url->SupportsReplacement()); | 569 DCHECK(search_url->SupportsReplacement()); |
| 570 urls.push_back(GURL(search_url->ReplaceSearchTerms(*default_provider, | 570 urls.push_back(GURL(WideToUTF8(search_url->ReplaceSearchTerms( |
| 571 value.substr(2), TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, | 571 *default_provider, value.substr(2), |
| 572 std::wstring()))); | 572 TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring())))); |
| 573 } else { | 573 } else { |
| 574 // This will create a file URL or a regular URL. | 574 // This will create a file URL or a regular URL. |
| 575 urls.push_back(GURL(WideToUTF8( | 575 urls.push_back(GURL(WideToUTF8( |
| 576 URLFixerUpper::FixupRelativeFile(cur_dir_, value)))); | 576 URLFixerUpper::FixupRelativeFile(cur_dir_, value)))); |
| 577 } | 577 } |
| 578 } | 578 } |
| 579 return urls; | 579 return urls; |
| 580 } | 580 } |
| 581 | 581 |
| 582 void BrowserInit::LaunchWithProfile::AddStartupURLs( | 582 void BrowserInit::LaunchWithProfile::AddStartupURLs( |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 scoped_refptr<AutomationProviderClass> automation = | 797 scoped_refptr<AutomationProviderClass> automation = |
| 798 new AutomationProviderClass(profile); | 798 new AutomationProviderClass(profile); |
| 799 automation->ConnectToChannel(channel_id); | 799 automation->ConnectToChannel(channel_id); |
| 800 automation->SetExpectedTabCount(expected_tabs); | 800 automation->SetExpectedTabCount(expected_tabs); |
| 801 | 801 |
| 802 AutomationProviderList* list = | 802 AutomationProviderList* list = |
| 803 g_browser_process->InitAutomationProviderList(); | 803 g_browser_process->InitAutomationProviderList(); |
| 804 DCHECK(list); | 804 DCHECK(list); |
| 805 list->AddProvider(automation); | 805 list->AddProvider(automation); |
| 806 } | 806 } |
| OLD | NEW |