Chromium Code Reviews| Index: components/omnibox/search_provider.h |
| diff --git a/components/omnibox/search_provider.h b/components/omnibox/search_provider.h |
| index c8307c38db2663f36dc4fc8ee6a2bc38f7de96d6..8805a2470995afc17dfdbda4ca4768d679dbd596 100644 |
| --- a/components/omnibox/search_provider.h |
| +++ b/components/omnibox/search_provider.h |
| @@ -248,10 +248,16 @@ class SearchProvider : public BaseSearchProvider, |
| // Adds a match for each result in |results| to |map|. |is_keyword| indicates |
| // whether the results correspond to the keyword provider or default provider. |
| - void AddHistoryResultsToMap(const HistoryResults& results, |
| - bool is_keyword, |
| - int did_not_accept_suggestion, |
| - MatchMap* map); |
| + void AddRawHistoryResultsToMap(const HistoryResults& results, |
| + bool is_keyword, |
| + int did_not_accept_suggestion, |
| + MatchMap* map); |
| + |
| + // Adds a match for each transformed result in |results| to |map|. |
| + void AddTransformedHistoryResultsToMap( |
| + const SearchSuggestionParser::SuggestResults& results, |
| + int did_not_accept_suggestion, |
| + MatchMap* map); |
| // Calculates relevance scores for all |results|. |
| SearchSuggestionParser::SuggestResults ScoreHistoryResults( |
| @@ -261,6 +267,11 @@ class SearchProvider : public BaseSearchProvider, |
| const base::string16& input_text, |
| bool is_keyword); |
| + void ScoreHistoryResultsMultiWord( |
|
Mark P
2014/09/16 22:24:55
I know what's bothering me. ScoreHistoryResultsMu
groby-ooo-7-16
2014/09/18 23:27:24
I'll stick with helper. I've spent 30 minutes with
|
| + const HistoryResults& results, |
| + bool is_keyword, |
| + SearchSuggestionParser::SuggestResults* scored_results); |
| + |
| // Adds matches for |results| to |map|. |
| void AddSuggestResultsToMap( |
| const SearchSuggestionParser::SuggestResults& results, |
| @@ -314,8 +325,9 @@ class SearchProvider : public BaseSearchProvider, |
| std::string GetSessionToken(); |
| // Answers prefetch handling - finds previously displayed answer matching the |
| - // current |input| and sets |prefetch_data_|. |
| - void DoAnswersQuery(const AutocompleteInput& input); |
| + // current top-scoring history result and sets |prefetch_data_|. |
| + // This only happens if |input| is a prefix for the top-scoring result. |
|
Mark P
2014/09/16 22:24:55
This comment is still not appropriate. It, for in
groby-ooo-7-16
2014/09/18 23:27:24
Hopefully, the new comment is a bit clearer.
|
| + AnswersQueryData FindAnswersPrefetchData(const base::string16& input); |
| // The amount of time to wait before sending a new suggest request after the |
| // previous one. Non-const because some unittests modify this value. |
| @@ -337,8 +349,13 @@ class SearchProvider : public BaseSearchProvider, |
| AutocompleteInput keyword_input_; |
| // Searches in the user's history that begin with the input text. |
| - HistoryResults keyword_history_results_; |
| - HistoryResults default_history_results_; |
| + HistoryResults raw_keyword_history_results_; |
| + HistoryResults raw_default_history_results_; |
| + |
| + // Scored searches in the user's history - based on |keyword_history_results_| |
| + // or default_history_results_ as appropriate. |
|
Mark P
2014/09/16 22:24:55
nit: be consistent about either using || or not.
groby-ooo-7-16
2014/09/18 23:27:24
Done.
|
| + SearchSuggestionParser::SuggestResults transformed_keyword_history_results_; |
| + SearchSuggestionParser::SuggestResults transformed_default_history_results_; |
| // A timer to start a query to the suggest server after the user has stopped |
| // typing for long enough. |