Index: chrome/browser/webdata/web_database.cc |
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc |
index cdf9d5828cb624ee7aa13d169169f546efaf6c5c..02c1f801b2955ab0854259577d8d50e803b65c91 100644 |
--- a/chrome/browser/webdata/web_database.cc |
+++ b/chrome/browser/webdata/web_database.cc |
@@ -21,11 +21,11 @@ |
// corresponding changes must happen in the unit tests, and new migration test |
// added. See |WebDatabaseMigrationTest::kCurrentTestedVersionNumber|. |
// static |
-const int WebDatabase::kCurrentVersionNumber = 47; |
+const int WebDatabase::kCurrentVersionNumber = 48; |
namespace { |
-const int kCompatibleVersionNumber = 47; |
+const int kCompatibleVersionNumber = 48; |
// Change the version number and possibly the compatibility version of |
// |meta_table_|. |
@@ -158,9 +158,9 @@ sql::InitStatus WebDatabase::Init(const FilePath& db_name) { |
} |
sql::InitStatus WebDatabase::MigrateOldVersionsAsNeeded() { |
- // Some malware tries to force protector to re-sign things by lowering the |
- // version number, causing migration to fail. Ensure the version number is at |
- // least as high as the compatible version number. |
+ // Some malware used to lower the version number, causing migration to |
+ // fail. Ensure the version number is at least as high as the compatible |
+ // version number. |
int current_version = std::max(meta_table_.GetVersionNumber(), |
meta_table_.GetCompatibleVersionNumber()); |
if (current_version > meta_table_.GetVersionNumber()) |
@@ -350,6 +350,13 @@ sql::InitStatus WebDatabase::MigrateOldVersionsAsNeeded() { |
ChangeVersion(&meta_table_, 47, true); |
// FALL THROUGH |
+ case 47: |
+ if (!keyword_table_->MigrateToVersion48RemoveKeywordsBackup()) |
+ return FailedMigrationTo(48); |
+ |
+ ChangeVersion(&meta_table_, 48, true); |
+ // FALL THROUGH |
+ |
// Add successive versions here. Each should set the version number and |
// compatible version number as appropriate, then fall through to the next |
// case. |