Chromium Code Reviews| 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..659d48a61e0f81b3a3ad4c48cf05d7c5057c004e 100644 |
| --- a/components/bookmarks/browser/bookmark_index.h |
| +++ b/components/bookmarks/browser/bookmark_index.h |
| @@ -41,12 +41,13 @@ 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. |
| + // |always_prefix_search| is passed to |GetBookmarksMatchingTerm| internally. |
| + void GetBookmarksMatching(const base::string16& query, |
| + size_t max_count, |
| + bool always_prefix_search, |
| + std::vector<BookmarkMatch>* results); |
| private: |
| typedef std::vector<const BookmarkNode*> Nodes; |
| @@ -70,8 +71,14 @@ 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. |
| + // When |always_prefix_search| is false, if the term is not long enough in the |
|
sky
2014/11/03 21:44:05
This description is confusing. I think you want so
Kibeom Kim (inactive)
2014/11/04 01:28:19
Done. (removed since we put enum and it's self-exp
|
| + // sense of |query_parser::QueryParser::IsWordLongEnoughForPrefixSearch|, it |
| + // is not considered for prefix search but only for an exact match. |
| + // When |always_prefix_search| is true, the term is always considered for a |
| + // prefix search, no matter its length. |
| bool GetBookmarksMatchingTerm(const base::string16& term, |
| bool first_term, |
| + bool always_prefix_search, |
| Matches* matches); |
| // Iterates over |matches| updating each Match's nodes to contain the |