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

Unified Diff: chrome/browser/history/url_database.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 some typos 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/url_database.h
diff --git a/chrome/browser/history/url_database.h b/chrome/browser/history/url_database.h
index 5cf44c29e32e62baaad83a1304043fa7eb31ebbd..c486560f8e45bee0044b51a855bb6210543e0b9e 100644
--- a/chrome/browser/history/url_database.h
+++ b/chrome/browser/history/url_database.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "chrome/browser/history/history_types.h"
+#include "chrome/browser/history/query_parser.h"
#include "chrome/browser/search_engines/template_url_id.h"
#include "sql/statement.h"
@@ -189,6 +190,12 @@ class URLDatabase {
bool allow_base,
history::URLRow* info);
+ // History search ------------------------------------------------------------
+
+ // Performs a brute force search over the database to find any URLs or titles
+ // which match the |query| string. Returns any matches in |results|.
+ bool GetTextMatches(const string16& query, URLRows* results);
+
// Keyword Search Terms ------------------------------------------------------
// Sets the search terms for the specified url/keyword pair.
@@ -289,6 +296,8 @@ class URLDatabase {
// have keyword search terms.
bool has_keyword_search_terms_;
+ QueryParser query_parser_;
+
DISALLOW_COPY_AND_ASSIGN(URLDatabase);
};
@@ -303,6 +312,6 @@ class URLDatabase {
" urls.id, urls.url, urls.title, urls.visit_count, urls.typed_count, " \
"urls.last_visit_time, urls.hidden "
-} // history
+} // namespace history
#endif // CHROME_BROWSER_HISTORY_URL_DATABASE_H_

Powered by Google App Engine
This is Rietveld 408576698