OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/startup/startup_browser_creator_win.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_win.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/win/metro.h" | 8 #include "base/win/metro.h" |
9 | 9 |
10 #include "chrome/browser/search_engines/template_url.h" | 10 #include "chrome/browser/search_engines/template_url.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 ::GetProcAddress(metro, "GetInitialSearchString")); | 46 ::GetProcAddress(metro, "GetInitialSearchString")); |
47 DCHECK(initial_search_string); | 47 DCHECK(initial_search_string); |
48 string16 search_string = initial_search_string(); | 48 string16 search_string = initial_search_string(); |
49 | 49 |
50 const TemplateURL* default_provider = | 50 const TemplateURL* default_provider = |
51 TemplateURLServiceFactory::GetForProfile(profile)-> | 51 TemplateURLServiceFactory::GetForProfile(profile)-> |
52 GetDefaultSearchProvider(); | 52 GetDefaultSearchProvider(); |
53 if (default_provider) { | 53 if (default_provider) { |
54 const TemplateURLRef& search_url = default_provider->url_ref(); | 54 const TemplateURLRef& search_url = default_provider->url_ref(); |
55 DCHECK(search_url.SupportsReplacement()); | 55 DCHECK(search_url.SupportsReplacement()); |
56 return GURL(search_url.ReplaceSearchTerms(search_string, | 56 return GURL(search_url.ReplaceSearchTerms( |
57 TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16())); | 57 TemplateURLRef::SearchTermsArgs(search_string))); |
58 } | 58 } |
59 } | 59 } |
60 return GURL(); | 60 return GURL(); |
61 } | 61 } |
62 | 62 |
63 } // namespace browser | 63 } // namespace browser |
64 | |
OLD | NEW |