Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: chrome/browser/autocomplete/base_search_provider.cc

Issue 165163002: Handle Search suggest subtypes for Shortcuts DB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autocomplete/base_search_provider.h ('k') | chrome/browser/autocomplete/shortcuts_backend.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/autocomplete/base_search_provider.h ('k') | chrome/browser/autocomplete/shortcuts_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698