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

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

Issue 470313004: [AiS] Use top local result for prefetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use top suggestion to retrieve answer. Created 6 years, 4 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/search_provider.h
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index 8ee4bd8c34a9e020461bebe3be45f3a58283b4f7..ad31a10d3792571e096ac8c0ecfbd109aed7c6ce 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -248,6 +248,11 @@ class SearchProvider : public BaseSearchProvider,
bool is_keyword,
int did_not_accept_suggestion,
MatchMap* map);
+ // Adds a match for each scored result in |results| to |map|.
Mark P 2014/09/05 22:18:16 I don't really like the notion of calling these "s
Mark P 2014/09/05 22:18:16 nit: missing blank line
groby-ooo-7-16 2014/09/10 23:21:38 Done.
groby-ooo-7-16 2014/09/10 23:21:38 Not really, so I'll stick with the suggestion :)
+ void AddScoredHistoryResultsToMap(
+ const SearchSuggestionParser::SuggestResults& results,
+ int did_not_accept_suggestion,
+ MatchMap* map);
// Calculates relevance scores for all |results|.
SearchSuggestionParser::SuggestResults ScoreHistoryResults(
@@ -256,7 +261,10 @@ class SearchProvider : public BaseSearchProvider,
bool input_multiple_words,
const base::string16& input_text,
bool is_keyword);
-
+ void ScoreHistoryResultsMultiWord(
Mark P 2014/09/05 22:18:16 I originally read this and added the comment "opti
groby-ooo-7-16 2014/09/10 23:21:38 The name is based on the comment in DoHistoryQuery
+ const HistoryResults& results,
+ bool is_keyword,
+ SearchSuggestionParser::SuggestResults* scored_results);
// Adds matches for |results| to |map|.
Mark P 2014/09/05 22:18:16 nit: missing blank line
groby-ooo-7-16 2014/09/10 23:21:38 Done.
void AddSuggestResultsToMap(
const SearchSuggestionParser::SuggestResults& results,
@@ -311,7 +319,7 @@ class SearchProvider : public BaseSearchProvider,
// Answers prefetch handling - finds previously displayed answer matching the
// current |input| and sets |prefetch_data_|.
Mark P 2014/09/05 22:18:16 This comment doesn't seem appropriate anymore. Pl
groby-ooo-7-16 2014/09/10 23:21:38 Done.
- void DoAnswersQuery(const AutocompleteInput& input);
+ 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.
@@ -336,6 +344,10 @@ class SearchProvider : public BaseSearchProvider,
HistoryResults keyword_history_results_;
HistoryResults default_history_results_;
+ // Scored searches in the user's history - based on xxx_history_results_.
Mark P 2014/09/05 22:18:16 nit: xxx_history_results_. -> keyword_history_resu
groby-ooo-7-16 2014/09/10 23:21:38 Done.
+ SearchSuggestionParser::SuggestResults scored_keyword_history_results_;
+ SearchSuggestionParser::SuggestResults scored_default_history_results_;
+
// A timer to start a query to the suggest server after the user has stopped
// typing for long enough.
base::OneShotTimer<SearchProvider> timer_;
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.cc » ('j') | chrome/browser/autocomplete/search_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698