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

Unified Diff: components/bookmarks/browser/bookmark_index.h

Issue 703553002: Allow systematic prefix search in bookmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments at https://codereview.chromium.org/701553002/ Created 6 years, 1 month 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/bookmarks/browser/bookmark_index.h
diff --git a/components/bookmarks/browser/bookmark_index.h b/components/bookmarks/browser/bookmark_index.h
index 6f6fd6e8035f757bc84f5fbc6225a5a4e1859fbf..8ca12bf3dd890d646d1e1489968246d1ffcb79fe 100644
--- a/components/bookmarks/browser/bookmark_index.h
+++ b/components/bookmarks/browser/bookmark_index.h
@@ -41,12 +41,12 @@ class BookmarkIndex {
// Invoked when a bookmark has been removed from the model.
void Remove(const BookmarkNode* node);
- // Returns up to |max_count| of bookmarks containing each term from
- // the text |query| in either the title or the URL.
- void GetBookmarksMatching(
- const base::string16& query,
- size_t max_count,
- std::vector<BookmarkMatch>* results);
+ // Returns up to |max_count| of bookmarks containing each term from the text
+ // |query| in either the title or the URL.
+ void GetBookmarksMatching(const base::string16& query,
+ size_t max_count,
+ query_parser::MatchingAlgorithm matching_algorithm,
+ std::vector<BookmarkMatch>* results);
private:
typedef std::vector<const BookmarkNode*> Nodes;
@@ -70,9 +70,11 @@ class BookmarkIndex {
// Populates |matches| for the specified term. If |first_term| is true, this
// is the first term in the query. Returns true if there is at least one node
// matching the term.
- bool GetBookmarksMatchingTerm(const base::string16& term,
- bool first_term,
- Matches* matches);
+ bool GetBookmarksMatchingTerm(
+ const base::string16& term,
+ bool first_term,
+ const query_parser::MatchingAlgorithm matching_algorithm,
+ Matches* matches);
// Iterates over |matches| updating each Match's nodes to contain the
// intersection of the Match's current nodes and the nodes at |index_i|.
« no previous file with comments | « no previous file | components/bookmarks/browser/bookmark_index.cc » ('j') | components/query_parser/query_parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698