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

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

Issue 13296: Adds QueryParser::ExtractQueryWords. For consistent this should... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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
« no previous file with comments | « no previous file | chrome/browser/history/query_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/query_parser.h
===================================================================
--- chrome/browser/history/query_parser.h (revision 6587)
+++ chrome/browser/history/query_parser.h (working copy)
@@ -48,6 +48,9 @@
// giving the matching region.
virtual bool HasMatchIn(const std::vector<QueryWord>& words,
Snippet::MatchPositions* match_positions) const = 0;
+
+ // Appends the words that make up this node in |words|.
+ virtual void AppendWords(std::vector<std::wstring>* words) const = 0;
};
@@ -67,6 +70,13 @@
void ParseQuery(const std::wstring& query,
std::vector<QueryNode*>* nodes);
+ // Parses a query returning the words that make up the query. Any words in
+ // quotes are put in |words| without the quotes. For example, the query text
+ // "foo bar" results in two entries being added to words, one for foo and one
+ // for bar.
+ void ExtractQueryWords(const std::wstring& query,
+ std::vector<std::wstring>* words);
+
// Returns true if the string text matches the query nodes created by a call
// to ParseQuery. If the query does match each of the matching positions in
// the text is added to |match_positions|.
« no previous file with comments | « no previous file | chrome/browser/history/query_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698