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

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

Issue 8550006: Make HistoryDatabase own StarredURLDatabase instead of inheriting from it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky review Created 9 years, 1 month 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/history/history_database.h ('k') | chrome/browser/history/starred_url_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_database.cc
diff --git a/chrome/browser/history/history_database.cc b/chrome/browser/history/history_database.cc
index 32c2cc3e305e3ef95cbc10d3ac4125abed56a597..18bb489866423bef69ee1b402d55aee25d1c95a8 100644
--- a/chrome/browser/history/history_database.cc
+++ b/chrome/browser/history/history_database.cc
@@ -14,6 +14,7 @@
#include "base/rand_util.h"
#include "base/string_util.h"
#include "chrome/browser/diagnostics/sqlite_diagnostics.h"
+#include "chrome/browser/history/starred_url_database.h"
#include "sql/transaction.h"
#if defined(OS_MACOSX)
@@ -261,7 +262,8 @@ sql::InitStatus HistoryDatabase::EnsureCurrentVersion(
// Put migration code here
if (cur_version == 15) {
- if (!MigrateBookmarksToFile(tmp_bookmarks_path) ||
+ StarredURLDatabase starred_url_database(&db_);
+ if (!starred_url_database.MigrateBookmarksToFile(tmp_bookmarks_path) ||
!DropStarredIDFromURLs()) {
LOG(WARNING) << "Unable to update history database to version 16.";
return sql::INIT_FAILURE;
« no previous file with comments | « chrome/browser/history/history_database.h ('k') | chrome/browser/history/starred_url_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698