| Index: components/history/core/browser/thumbnail_database.cc
|
| diff --git a/components/history/core/browser/thumbnail_database.cc b/components/history/core/browser/thumbnail_database.cc
|
| index e82888492a36db72869d5b2fc5544556922ceaa8..20ae05bf77e6ea671fae5558914e807979291889 100644
|
| --- a/components/history/core/browser/thumbnail_database.cc
|
| +++ b/components/history/core/browser/thumbnail_database.cc
|
| @@ -88,7 +88,7 @@ namespace {
|
| // the new version and a test to verify that Init() works with it.
|
| const int kCurrentVersionNumber = 7;
|
| const int kCompatibleVersionNumber = 7;
|
| -const int kDeprecatedVersionNumber = 4; // and earlier.
|
| +const int kDeprecatedVersionNumber = 5; // and earlier.
|
|
|
| void FillIconMapping(const sql::Statement& statement,
|
| const GURL& page_url,
|
| @@ -438,8 +438,8 @@ void RecoverDatabaseOrRaze(sql::Connection* db, const base::FilePath& db_path) {
|
|
|
| // This code may be able to fetch version information that the regular
|
| // deprecation path cannot.
|
| - // NOTE(shess): v5 and v6 are currently not deprecated in the normal Init()
|
| - // path, but are deprecated in the recovery path in the interest of keeping
|
| + // NOTE(shess,rogerm): v6 is not currently deprecated in the normal Init()
|
| + // path, but is deprecated in the recovery path in the interest of keeping
|
| // the code simple. http://crbug.com/327485 for numbers.
|
| DCHECK_LE(kDeprecatedVersionNumber, 6);
|
| if (version <= 6) {
|
| @@ -1240,12 +1240,6 @@ sql::InitStatus ThumbnailDatabase::InitImpl(const base::FilePath& db_name) {
|
| return sql::INIT_FAILURE;
|
| }
|
|
|
| - if (cur_version == 5) {
|
| - ++cur_version;
|
| - if (!UpgradeToVersion6())
|
| - return CantUpgradeToVersion(cur_version);
|
| - }
|
| -
|
| if (cur_version == 6) {
|
| ++cur_version;
|
| if (!UpgradeToVersion7())
|
| @@ -1283,32 +1277,6 @@ sql::InitStatus ThumbnailDatabase::CantUpgradeToVersion(int cur_version) {
|
| return sql::INIT_FAILURE;
|
| }
|
|
|
| -bool ThumbnailDatabase::UpgradeToVersion6() {
|
| - // Move bitmap data from favicons to favicon_bitmaps.
|
| - bool success =
|
| - db_.Execute("INSERT INTO favicon_bitmaps (icon_id, last_updated, "
|
| - "image_data, width, height)"
|
| - "SELECT id, last_updated, image_data, 0, 0 FROM favicons") &&
|
| - db_.Execute("CREATE TABLE temp_favicons ("
|
| - "id INTEGER PRIMARY KEY,"
|
| - "url LONGVARCHAR NOT NULL,"
|
| - "icon_type INTEGER DEFAULT 1,"
|
| - // default icon_type FAVICON to be consistent with
|
| - // past migration.
|
| - "sizes LONGVARCHAR)") &&
|
| - db_.Execute("INSERT INTO temp_favicons (id, url, icon_type) "
|
| - "SELECT id, url, icon_type FROM favicons") &&
|
| - db_.Execute("DROP TABLE favicons") &&
|
| - db_.Execute("ALTER TABLE temp_favicons RENAME TO favicons");
|
| - // NOTE(shess): v7 will re-create the index.
|
| - if (!success)
|
| - return false;
|
| -
|
| - meta_table_.SetVersionNumber(6);
|
| - meta_table_.SetCompatibleVersionNumber(std::min(6, kCompatibleVersionNumber));
|
| - return true;
|
| -}
|
| -
|
| bool ThumbnailDatabase::UpgradeToVersion7() {
|
| // Sizes column was never used, remove it.
|
| bool success =
|
|
|