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

Unified Diff: chrome/browser/history/query_parser.cc

Issue 10913262: Implement Bookmark Autocomplete Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Now handles duplicate term matching. Comments, etc. Created 8 years, 2 months 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: chrome/browser/history/query_parser.cc
===================================================================
--- chrome/browser/history/query_parser.cc (revision 159706)
+++ chrome/browser/history/query_parser.cc (working copy)
@@ -125,16 +125,17 @@
bool QueryNodeWord::HasMatchIn(const std::vector<QueryWord>& words,
Snippet::MatchPositions* match_positions) const {
+ bool matched = false;
for (size_t i = 0; i < words.size(); ++i) {
if (Matches(words[i].word, false)) {
size_t match_start = words[i].position;
match_positions->push_back(
Snippet::MatchPosition(match_start,
match_start + static_cast<int>(word_.size())));
- return true;
+ matched = true;
}
}
- return false;
+ return matched;
}
void QueryNodeWord::AppendWords(std::vector<string16>* words) const {

Powered by Google App Engine
This is Rietveld 408576698