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

Unified Diff: chrome/browser/autocomplete/zero_suggest_provider.h

Issue 158053002: Part 4 of search provider refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't copy suggestion Created 6 years, 10 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
Index: chrome/browser/autocomplete/zero_suggest_provider.h
diff --git a/chrome/browser/autocomplete/zero_suggest_provider.h b/chrome/browser/autocomplete/zero_suggest_provider.h
index c3fd7ef744b24a30fec467fb80e36fd1e03e41a9..23a9f7086ab1f47c674890cdd5c9c703c6c9056a 100644
--- a/chrome/browser/autocomplete/zero_suggest_provider.h
+++ b/chrome/browser/autocomplete/zero_suggest_provider.h
@@ -72,6 +72,14 @@ class ZeroSuggestProvider : public BaseSearchProvider {
virtual ~ZeroSuggestProvider();
+ // BaseSearchProvider:
+ virtual const TemplateURL* GetTemplateURL(
+ const SuggestResult& result) const OVERRIDE;
+ virtual const AutocompleteInput GetInput(
+ const SuggestResult& result) const OVERRIDE;
+ virtual bool ShouldAppendExtraParams(
+ const SuggestResult& result) const OVERRIDE;
+
// The 4 functions below (that take classes defined in SearchProvider as
// arguments) were copied and trimmed from SearchProvider.
// TODO(hfung): Refactor them into a new base class common to both
@@ -86,25 +94,11 @@ class ZeroSuggestProvider : public BaseSearchProvider {
SuggestResults* suggest_results,
NavigationResults* navigation_results);
- // Creates AutocompleteMatches to search |template_url| for "<suggestion>" for
- // all suggestions in |results|, and adds them to |map|.
+ // Adds AutocompleteMatches for each of the suggestions in |results| to
+ // |map|.
void AddSuggestResultsToMap(const SuggestResults& results,
- const TemplateURL* template_url,
MatchMap* map);
- // Creates an AutocompleteMatch with the provided |relevance| and |type| to
- // search |template_url| for |query_string|. |accepted_suggestion| will be
- // used to generate Assisted Query Stats.
- //
- // Adds this match to |map|; if such a match already exists, whichever one
- // has lower relevance is eliminated.
- void AddMatchToMap(int relevance,
- AutocompleteMatch::Type type,
- const TemplateURL* template_url,
- const base::string16& query_string,
- int accepted_suggestion,
- MatchMap* map);
-
// Returns an AutocompleteMatch for a navigational suggestion |navigation|.
AutocompleteMatch NavigationToMatch(const NavigationResult& navigation);
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/autocomplete/zero_suggest_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698