Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1613)

Unified Diff: chrome/browser/history/history_backend.cc

Issue 173296: Convert internal time format to Windows 1601 epoch on Linux & Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_codec.cc ('k') | chrome/browser/history/history_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.cc
===================================================================
--- chrome/browser/history/history_backend.cc (revision 24094)
+++ chrome/browser/history/history_backend.cc (working copy)
@@ -529,6 +529,13 @@
LOG(WARNING) << "Text database initialization failed, running without it.";
text_database_.reset();
}
+ if (db_->needs_version_17_migration()) {
+ // See needs_version_17_migration() decl for more. In this case, we want
+ // to erase all the text database files. This must be done after the text
+ // database manager has been initialized, since it knows about all the
+ // files it manages.
+ text_database_->DeleteAll();
+ }
// Thumbnail database.
thumbnail_db_.reset(new ThumbnailDatabase());
@@ -544,6 +551,12 @@
}
// Archived database.
+ if (db_->needs_version_17_migration()) {
+ // See needs_version_17_migration() decl for more. In this case, we want
+ // to delete the archived database and need to do so before we try to
+ // open the file. We can ignore any error (maybe the file doesn't exist).
+ file_util::Delete(archived_name, false);
+ }
archived_db_.reset(new ArchivedDatabase());
if (!archived_db_->Init(archived_name)) {
LOG(WARNING) << "Could not initialize the archived database.";
« no previous file with comments | « chrome/browser/bookmarks/bookmark_codec.cc ('k') | chrome/browser/history/history_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698