summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/query_parser.h
diff options
context:
space:
mode:
authormrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 22:05:56 +0000
committermrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 22:05:56 +0000
commit25320604c11e0313ef5663bff8553b2c9febc9f6 (patch)
tree55308b36539b8cd9b59135668918aa1918d66198 /chrome/browser/history/query_parser.h
parent7b4fc6ceac0ba80ed243f6ae5278bb048a9106d4 (diff)
downloadchromium_src-25320604c11e0313ef5663bff8553b2c9febc9f6.zip
chromium_src-25320604c11e0313ef5663bff8553b2c9febc9f6.tar.gz
chromium_src-25320604c11e0313ef5663bff8553b2c9febc9f6.tar.bz2
Implement Bookmark Autocomplete Provider
Introduce a new autocomplete provider that searches bookmarks by bookmark title. Note: The behavior of QueryNodeWord::HasMatchIn in query_parser.cc has been changed to return all match positions rather than just the first. Note: CoalesceMatchesFrom (in query_parser.cc) has been changed to replace the intersection of two match positions with the union of those two matches. Previously, it would behave differently based on ordering of the terms. BUG=13308,154582,155873 TEST=New unit tests added. Existing unit tests enhanced. pkasting: everything under autocomplete/. mpearson: scoring in bookmark_provider, also unit test. isherman: metrics (Done). sky: query_parser.h/.cc and bookmark_index.h/.cc. Review URL: https://codereview.chromium.org/10913262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162807 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/query_parser.h')
-rw-r--r--chrome/browser/history/query_parser.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/history/query_parser.h b/chrome/browser/history/query_parser.h
index 96cd16e..b85417a 100644
--- a/chrome/browser/history/query_parser.h
+++ b/chrome/browser/history/query_parser.h
@@ -40,9 +40,9 @@ class QueryNode {
// must exactly match. Otherwise, this uses a starts with comparison.
virtual bool Matches(const string16& word, bool exact) const = 0;
- // Returns true if this node matches at least one of the words in |words|. If
- // the node matches at least one word, an entry is added to |match_positions|
- // giving the matching region.
+ // Returns true if this node matches at least one of the words in |words|. An
+ // entry is added to |match_positions| for all matching words giving the
+ // matching regions.
virtual bool HasMatchIn(const std::vector<QueryWord>& words,
Snippet::MatchPositions* match_positions) const = 0;