Chromium Code Reviews| Index: chrome/browser/autocomplete/base_search_provider.cc |
| diff --git a/chrome/browser/autocomplete/base_search_provider.cc b/chrome/browser/autocomplete/base_search_provider.cc |
| index 87b67ce081a6f0391faab016ec2175e9809bbf9c..e1551972db0f55fc07e7d1dc36a8867e1a1d2360 100644 |
| --- a/chrome/browser/autocomplete/base_search_provider.cc |
| +++ b/chrome/browser/autocomplete/base_search_provider.cc |
| @@ -123,6 +123,35 @@ bool BaseSearchProvider::ShouldPrefetch(const AutocompleteMatch& match) { |
| return match.GetAdditionalInfo(kShouldPrefetchKey) == kTrue; |
| } |
| +// static |
| +AutocompleteMatch BaseSearchProvider::CreateSearchSuggestion( |
| + const base::string16& suggestion, |
| + AutocompleteMatchType::Type type, |
| + const base::string16& match_contents, |
|
Peter Kasting
2014/03/24 21:53:07
You don't seem to use this arg?
Anuj
2014/03/25 06:32:05
Done.
|
| + bool from_keyword_provider, |
| + const TemplateURL* template_url) { |
| + return CreateSearchSuggestion( |
| + NULL, |
| + AutocompleteInput(), |
| + BaseSearchProvider::SuggestResult( |
| + suggestion, |
| + type, |
| + suggestion, |
| + base::string16(), // Omit match_contents_prefix. |
| + base::string16(), |
| + std::string(), // Omit suggest_query_params. |
| + std::string(), // Omit deletion_url. |
| + from_keyword_provider, |
| + 0, // Ignore relevance. |
| + false, // Ignore relevance_from_server. |
| + false, // Ignore should_prefetch. |
| + base::string16()), // Omit input_test. |
| + template_url, |
| + 0, // accepted_suggestion |
| + 0, // omnibox_start_margin, |
| + false); |
|
Peter Kasting
2014/03/24 21:53:07
Nit: Let's go ahead and omit the EOL comments and
Anuj
2014/03/25 06:32:05
Done.
|
| +} |
| + |
| void BaseSearchProvider::Stop(bool clear_cached_results) { |
| StopSuggest(); |
| done_ = true; |