| Index: chrome/browser/history/history_database.cc
|
| diff --git a/chrome/browser/history/history_database.cc b/chrome/browser/history/history_database.cc
|
| index e4a5920536ed1df658212121012b0fe270b46abd..fb107a20459b6f918069223c2f5c46d0fadf5c59 100644
|
| --- a/chrome/browser/history/history_database.cc
|
| +++ b/chrome/browser/history/history_database.cc
|
| @@ -26,7 +26,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 = 23;
|
| +static const int kCurrentVersionNumber = 24;
|
| static const int kCompatibleVersionNumber = 16;
|
| static const char kEarlyExpirationThresholdKey[] = "early_expiration_threshold";
|
|
|
| @@ -344,6 +344,16 @@ sql::InitStatus HistoryDatabase::EnsureCurrentVersion() {
|
| meta_table_.SetVersionNumber(cur_version);
|
| }
|
|
|
| + if (cur_version == 23) {
|
| + if (!MigrateDownloadsReasonPathsAndDangerType()) {
|
| + LOG(WARNING) << "Unable to upgrade download interrupt reason and paths";
|
| + // Invalid state values may cause crashes.
|
| + 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()) <<
|
|
|