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..ea93bb4377b7b37fa9c020c80aaffcba86b11afb 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); |
@@ -276,6 +272,15 @@ class SearchProvider : public BaseSearchProvider { |
const std::string& metadata, |
MatchMap* map); |
+ // Returns the AutocompleteInput object corresponding to the given |result|. |
+ const AutocompleteInput GetInput(const SuggestResult& result) const; |
Mark P
2014/02/10 23:25:55
possibly unnecessary. See comment elsewhere.
Maria
2014/02/11 21:42:32
Done.
|
+ |
+ // Returns the TemplateURL used to search for the |result|. |
+ const TemplateURL* GetTemplateURL(const SuggestResult& result) const; |
+ |
+ // Returns whether |result| is coming from the default search provider. |
Mark P
2014/02/10 23:25:55
This comment is slightly wrong. It doesn't match
Maria
2014/02/11 21:42:32
Done.
|
+ bool IsDefaultSearchProviderResult(const SuggestResult& result) const; |
+ |
// 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 +317,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 +337,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_; |