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

Unified Diff: chrome/browser/history/history_database.cc

Issue 10067030: Upgrade the history database to version 23 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sync and update test data Created 8 years, 8 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
« no previous file with comments | « chrome/browser/history/android/android_urls_database_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_database.cc
diff --git a/chrome/browser/history/history_database.cc b/chrome/browser/history/history_database.cc
index f4c3aa17c6ab425a09698f7f84338244227ea5c7..0e65f959f3bf229d1f76059225a188880f2ba218 100644
--- a/chrome/browser/history/history_database.cc
+++ b/chrome/browser/history/history_database.cc
@@ -28,7 +28,7 @@ namespace {
// Current version number. We write databases at the "current" version number,
// but any previous version that can read the "compatible" one can make do with
// or database without *too* many bad effects.
-static const int kCurrentVersionNumber = 21;
+static const int kCurrentVersionNumber = 22;
static const int kCompatibleVersionNumber = 16;
static const char kEarlyExpirationThresholdKey[] = "early_expiration_threshold";
@@ -322,6 +322,16 @@ sql::InitStatus HistoryDatabase::EnsureCurrentVersion(
meta_table_.SetVersionNumber(cur_version);
}
+ if (cur_version == 21) {
+ // The android_urls table's data schemal was changed in version 21.
+#if defined(OS_ANDROID)
+ if (!MigrateToVersion22()) {
+ LOG(WARNING) << "Unable to migrate the android_urls table to version 22";
+ }
+#endif
+ ++cur_version;
+ meta_table_.SetVersionNumber(cur_version);
+ }
// When the version is too old, we just try to continue anyway, there should
// not be a released product that makes a database too old for us to handle.
LOG_IF(WARNING, cur_version < GetCurrentVersion()) <<
« no previous file with comments | « chrome/browser/history/android/android_urls_database_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698