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

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

Issue 15645012: Omnibox: Rebuild HQP Cache if it's old (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: polish 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_index_private_data.h
diff --git a/chrome/browser/history/url_index_private_data.h b/chrome/browser/history/url_index_private_data.h
index 5cd458960ae0c388c0879dd922d006742ab5d4fd..4d0e18d955e5d0730ac1c9e39ecd34ec2bc3a7f2 100644
--- a/chrome/browser/history/url_index_private_data.h
+++ b/chrome/browser/history/url_index_private_data.h
@@ -34,7 +34,7 @@ class InMemoryURLIndex;
class RefCountedBool;
// Current version of the cache file.
-static const int kCurrentCacheFileVersion = 2;
+static const int kCurrentCacheFileVersion = 3;
// A structure private to InMemoryURLIndex describing its internal data and
// providing for restoring, rebuilding and updating that internal data. As
@@ -153,6 +153,7 @@ class URLIndexPrivateData
FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, CacheSaveRestore);
FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, HugeResultSet);
FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, ReadVisitsFromHistory);
+ FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, RebuildFromHistoryIfCacheOld);
FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, Scoring);
FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, TitleSearch);
FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, TypedCharacterCaching);
@@ -335,6 +336,10 @@ class URLIndexPrivateData
// database this will be 0.
int restored_cache_version_;
+ // The last time the data was rebuilt from the history database. If this
+ // instance was built from history right now, this time will be about Now().
Peter Kasting 2013/06/07 00:39:55 This last sentence seems unnecessary.
Mark P 2013/06/07 00:50:27 Okay. Dropped.
+ base::Time last_time_rebuilt_from_history_;
+
// A list of all of indexed words. The index of a word in this list is the
// ID of the word in the word_map_. It reduces the memory overhead by
// replacing a potentially long and repeated string with a simple index.

Powered by Google App Engine
This is Rietveld 408576698