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

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

Issue 701553002: Allow systematic prefix search in bookmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_model.h
diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h
index bf0ded9836627d0067b899b9e19ffd39410455d7..355246138596ad055be0bf8cccfbd4b80a6f27a9 100644
--- a/components/bookmarks/browser/bookmark_model.h
+++ b/components/bookmarks/browser/bookmark_model.h
@@ -236,10 +236,19 @@ class BookmarkModel : public KeyedService {
// Returns up to |max_count| of bookmarks containing each term from |text|
// in either the title or the URL.
+ // Short terms in the query are matched exactly.
void GetBookmarksMatching(const base::string16& text,
size_t max_count,
std::vector<bookmarks::BookmarkMatch>* matches);
+ // Returns up to |max_count| of bookmarks containing each term from |text|
+ // in either the title or the URL.
+ // All terms in the query are matched by prefix.
+ void GetBookmarksMatchingPrefixes(
+ const base::string16& text,
+ size_t max_count,
+ std::vector<bookmarks::BookmarkMatch>* matches);
+
// Sets the store to NULL, making it so the BookmarkModel does not persist
// any changes to disk. This is only useful during testing to speed up
// testing.

Powered by Google App Engine
This is Rietveld 408576698