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

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

Issue 703553002: Allow systematic prefix search in bookmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: put missing "M" back 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..8ca141587e3736227de6acc139a3db98d26abb30 100644
--- a/components/bookmarks/browser/bookmark_model.h
+++ b/components/bookmarks/browser/bookmark_model.h
@@ -46,6 +46,10 @@ namespace favicon_base {
struct FaviconImageResult;
}
+namespace query_parser {
+enum class MatchingAlgorithm;
+}
+
// BookmarkModel --------------------------------------------------------------
// BookmarkModel provides a directed acyclic graph of URLs and folders.
@@ -235,11 +239,19 @@ class BookmarkModel : public KeyedService {
void ResetDateFolderModified(const BookmarkNode* node);
// Returns up to |max_count| of bookmarks containing each term from |text|
- // in either the title or the URL.
+ // in either the title or the URL. It uses default matching algorithm.
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.
+ void GetBookmarksMatching(
+ const base::string16& text,
+ size_t max_count,
+ query_parser::MatchingAlgorithm matching_algorithm,
+ 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.
« no previous file with comments | « components/bookmarks/browser/bookmark_index_unittest.cc ('k') | components/bookmarks/browser/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698