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

Unified Diff: components/omnibox/browser/url_index_private_data.h

Issue 2187343002: Generating autocomplete results with and without word breaks in the Omnibox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: I tried to remove duplicates and improve effciency. I appreciated the comments. Created 4 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: components/omnibox/browser/url_index_private_data.h
diff --git a/components/omnibox/browser/url_index_private_data.h b/components/omnibox/browser/url_index_private_data.h
index 100692cd7b44e63de9bfbc2b01c3501a6e2bbd95..9c8549c0e1f90201bbfdfaaf827f276d5245cf39 100644
--- a/components/omnibox/browser/url_index_private_data.h
+++ b/components/omnibox/browser/url_index_private_data.h
@@ -50,6 +50,25 @@ class URLIndexPrivateData
public:
URLIndexPrivateData();
+ // Returns history URL matches
Mark P 2016/08/18 19:36:53 This comment doesn't say anything useful. You wan
Lavar Askew 2016/08/19 04:46:07 Done.
+ ScoredHistoryMatches GetScoredItemsForSearchString(
+ const base::string16& search_string,
+ const HistoryIDSet& history_id_set,
+ const size_t& max_matches,
Mark P 2016/08/18 19:36:53 nit: please remove the & here; it's not useful
Lavar Askew 2016/08/19 04:46:07 Done.
+ bookmarks::BookmarkModel* bookmark_model,
+ TemplateURLService* template_url_service);
+
+ // Returns a vector of individual words based in the base::string16
+ // search_string. Each index of the vector represents a single word
+ // in the search_string.
Mark P 2016/08/18 19:36:53 nit: shorter and clearer: // Returns a vector of i
+ String16Vector ExtractIndividualWordVector(
+ const base::string16& search_string);
+
+ // Given a base::string16 in |term_string|, scans the history index and
Mark P 2016/08/18 19:36:53 nit: omit "base::string16" -- this is obvious from
Lavar Askew 2016/08/19 04:46:07 Done.
+ // returns the set of history item IDs. Will return an emptyHistoryIDSet
Mark P 2016/08/18 19:36:53 after IDs, add "containing all the terms in |term_
Lavar Askew 2016/08/19 04:46:07 Done.
+ // if the index has not been initialized or the search string has no words.
+ HistoryIDSet GetHistoryIDSet(const String16Vector& lower_words);
+
// Given a base::string16 in |term_string|, scans the history index and
// returns a vector with all scored, matching history items. The
// |term_string| is broken down into individual terms (words), each of which

Powered by Google App Engine
This is Rietveld 408576698