Chromium Code Reviews| Index: chrome/browser/autocomplete/search_provider.h |
| diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h |
| index 619f3ee8178d817c51994abc235e383a254beec4..9dcf355b9d5d3ce168e2643dcdede513e093bc3f 100644 |
| --- a/chrome/browser/autocomplete/search_provider.h |
| +++ b/chrome/browser/autocomplete/search_provider.h |
| @@ -57,10 +57,6 @@ class SearchProvider : public BaseSearchProvider { |
| SearchProvider(AutocompleteProviderListener* listener, Profile* profile); |
| - // Returns whether the SearchProvider previously flagged |match| as a query |
| - // that should be prefetched. |
| - static bool ShouldPrefetch(const AutocompleteMatch& match); |
| - |
| // Extracts the suggest response metadata which SearchProvider previously |
| // stored for |match|. |
| static std::string GetSuggestMetadata(const AutocompleteMatch& match); |
| @@ -167,6 +163,10 @@ class SearchProvider : public BaseSearchProvider { |
| // net::URLFetcherDelegate: |
| virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
| + // BaseSearchProvider: |
| + virtual bool ShouldAppendExtraParams( |
| + const SuggestResult& result) const OVERRIDE; |
| + |
| // This gets called when we have requested a suggestion deletion from the |
| // server to handle the results of the deletion. |
| void OnDeletionComplete(bool success, |
| @@ -276,6 +276,12 @@ class SearchProvider : public BaseSearchProvider { |
| const std::string& metadata, |
| MatchMap* map); |
| + // Returns the AutocompleteInput object corresponding to the given |result|. |
|
Mark P
2014/02/12 23:35:49
Can we try a comment that makes it clearer most pr
Maria
2014/02/13 21:07:36
I decided to change this to take is_keyword instea
|
| + const AutocompleteInput GetInput(const SuggestResult& result) const; |
| + |
| + // Returns the TemplateURL used to search for the |result|. |
| + const TemplateURL* GetTemplateURL(const SuggestResult& result) const; |
|
H Fung
2014/02/13 01:43:33
Maybe consider moving this into BaseSearchProvider
msw
2014/02/13 02:43:50
+1
Maria
2014/02/13 21:07:36
Done.
|
| + |
| // Gets the relevance score for the verbatim result. This value may be |
| // provided by the suggest server or calculated locally; if |
| // |relevance_from_server| is non-NULL, it will be set to indicate which of |
| @@ -312,15 +318,6 @@ class SearchProvider : public BaseSearchProvider { |
| bool use_aggressive_method, |
| bool prevent_search_history_inlining) const; |
| - // Creates an AutocompleteMatch for "Search <engine> for |query_string|" with |
| - // the supplied details. Adds this match to |map|; if such a match already |
| - // exists, whichever one has lower relevance is eliminated. |
| - void AddMatchToMap(const SuggestResult& result, |
| - const base::string16& input_text, |
| - const std::string& metadata, |
| - int accepted_suggestion, |
| - MatchMap* map); |
| - |
| // Returns an AutocompleteMatch for a navigational suggestion. |
| AutocompleteMatch NavigationToMatch(const NavigationResult& navigation); |
| @@ -341,26 +338,6 @@ class SearchProvider : public BaseSearchProvider { |
| // previous one. Non-const because some unittests modify this value. |
| static int kMinimumTimeBetweenSuggestQueriesMs; |
| - // The following keys are used to record additional information on matches. |
| - |
| - // We annotate our AutocompleteMatches with whether their relevance scores |
| - // were server-provided using this key in the |additional_info| field. |
| - static const char kRelevanceFromServerKey[]; |
| - |
| - // Indicates whether the server said a match should be prefetched. |
| - static const char kShouldPrefetchKey[]; |
| - |
| - // Used to store metadata from the server response, which is needed for |
| - // prefetching. |
| - static const char kSuggestMetadataKey[]; |
| - |
| - // Used to store a deletion request url for server-provided suggestions. |
| - static const char kDeletionUrlKey[]; |
| - |
| - // These are the values for the above keys. |
| - static const char kTrue[]; |
| - static const char kFalse[]; |
| - |
| // Maintains the TemplateURLs used. |
| Providers providers_; |