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

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

Issue 16776004: Replace FTS in the history_service with a brute force text search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix kSafeRegexWordBoundary for Korean. Created 7 years, 6 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.h
diff --git a/chrome/browser/history/query_parser.h b/chrome/browser/history/query_parser.h
index 6bb0787cb6a5481410cff11191cc3d1412782590..c5400ef0670a52369972ff225b74e5ba75a80464 100644
--- a/chrome/browser/history/query_parser.h
+++ b/chrome/browser/history/query_parser.h
@@ -33,6 +33,11 @@ class QueryNode {
// the number of words in this node.
virtual int AppendToSQLiteQuery(string16* query) const = 0;
+ // Serialize ourselves out to a series of strings which can be passed to
+ // SQLite as REGEXP queries.
+ virtual void AppendSQLiteRegexpQueries(
+ std::vector<string16>* queries) const = 0;
+
// Return true if this is a QueryNodeWord, false if it's a QueryNodeList.
virtual bool IsWord() const = 0;
@@ -69,6 +74,11 @@ class QueryParser {
// |sqlite_query| and the number of words is returned.
int ParseQuery(const string16& query, string16* sqlite_query);
+ // Parse a query into a series of SQLite REGEXP queries. The resulting queries
+ // are placed in |sqlite_queries|.
+ void ParseQueryAsRegexps(const string16& query,
+ std::vector<string16>* sqlite_queries);
+
// Parses |query|, returning the words that make up it. 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

Powered by Google App Engine
This is Rietveld 408576698