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

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: correct 1 to -1. 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..962fd1bdf54d8face7133acf5c2d442caa703251 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,9 @@ class URLIndexPrivateData
// database this will be 0.
int restored_cache_version_;
+ // The last time the data was rebuilt from the history database.
+ 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.
« no previous file with comments | « chrome/browser/history/in_memory_url_index_unittest.cc ('k') | chrome/browser/history/url_index_private_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698