diff options
author | nshkrob@chromium.org <nshkrob@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 16:28:51 +0000 |
---|---|---|
committer | nshkrob@chromium.org <nshkrob@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 16:28:51 +0000 |
commit | 586ffa48f1529739ce7cfbcc38e22fc907438ca4 (patch) | |
tree | bc2dde167facda0a9b125b6feca7f1b2bab56202 | |
parent | eedeafa7b6789d6ecb6f65f3dc878cc0b5a5124d (diff) | |
download | chromium_src-586ffa48f1529739ce7cfbcc38e22fc907438ca4.zip chromium_src-586ffa48f1529739ce7cfbcc38e22fc907438ca4.tar.gz chromium_src-586ffa48f1529739ce7cfbcc38e22fc907438ca4.tar.bz2 |
Remove the warning during conversion to TopSites.
Set version back to non-top sites when running without the --top-sites flag.
BUG=none
TEST=chrome --top-sites
Review URL: http://codereview.chromium.org/2844045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51850 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/history/history_database.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/history/history_database.cc b/chrome/browser/history/history_database.cc index e909587..26bb81a 100644 --- a/chrome/browser/history/history_database.cc +++ b/chrome/browser/history/history_database.cc @@ -286,9 +286,17 @@ sql::InitStatus HistoryDatabase::EnsureCurrentVersion( if (cur_version == 17) needs_version_18_migration_ = true; + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites) && + cur_version == 18) { + // Set DB version back to pre-top sites. + cur_version = 17; + 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()) << + LOG_IF(WARNING, (cur_version < GetCurrentVersion() && + !needs_version_18_migration_)) << "History database version " << cur_version << " is too old to handle."; return sql::INIT_OK; |