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

Unified Diff: components/history/core/browser/url_database.cc

Issue 2864103003: Limit the number of history urls indexed for omnibox suggestions. (Closed)
Patch Set: Address comments. Created 3 years, 7 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: components/history/core/browser/url_database.cc
diff --git a/components/history/core/browser/url_database.cc b/components/history/core/browser/url_database.cc
index 248ecf47d865bd0944aad9a375fd9fa7f433977e..3650382c6fe2a86a6a090fff8382cd9a09ef5be7 100644
--- a/components/history/core/browser/url_database.cc
+++ b/components/history/core/browser/url_database.cc
@@ -248,6 +248,9 @@ bool URLDatabase::InitURLEnumeratorForSignificant(URLEnumerator* enumerator) {
sql.append(kURLRowFields);
sql.append(" FROM urls WHERE last_visit_time >= ? OR visit_count >= ? OR "
"typed_count >= ?");
+ sql.append(
+ " ORDER BY typed_count DESC, last_visit_time DESC, visit_count "
+ "DESC");
enumerator->statement_.Assign(GetDB().GetUniqueStatement(sql.c_str()));
enumerator->statement_.BindInt64(
0, AutocompleteAgeThreshold().ToInternalValue());
« no previous file with comments | « components/history/core/browser/url_database.h ('k') | components/history/core/browser/url_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698