Index: components/history/core/browser/history_database.cc |
diff --git a/components/history/core/browser/history_database.cc b/components/history/core/browser/history_database.cc |
index 93a6d22c9736d9bca5e601bf927e36744be486a9..a11edafc1465c8d448e3b7ae7075bb98527fee2d 100644 |
--- a/components/history/core/browser/history_database.cc |
+++ b/components/history/core/browser/history_database.cc |
@@ -36,7 +36,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 |
// our database without *too* many bad effects. |
-const int kCurrentVersionNumber = 31; |
+const int kCurrentVersionNumber = 32; |
const int kCompatibleVersionNumber = 16; |
const char kEarlyExpirationThresholdKey[] = "early_expiration_threshold"; |
const int kMaxHostsInMemory = 10000; |
@@ -508,6 +508,15 @@ sql::InitStatus HistoryDatabase::EnsureCurrentVersion() { |
meta_table_.SetVersionNumber(cur_version); |
} |
+ if (cur_version == 31) { |
+ if (!MigrateDownloadSiteInstanceUrl()) { |
+ LOG(WARNING) << "Unable to migrate history to version 32"; |
+ return sql::INIT_FAILURE; |
+ } |
+ 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()) << |