diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 18:29:27 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 18:29:27 +0000 |
commit | fc2871117d640007a884a24d0c6adebbcc8dc718 (patch) | |
tree | b196c333e9dffb28aaf822be4f4463732c7ef197 /chrome/browser/history/history_database.cc | |
parent | b808ec2c7082a1c842bad7626ba0d651097a2886 (diff) | |
download | chromium_src-fc2871117d640007a884a24d0c6adebbcc8dc718.zip chromium_src-fc2871117d640007a884a24d0c6adebbcc8dc718.tar.gz chromium_src-fc2871117d640007a884a24d0c6adebbcc8dc718.tar.bz2 |
Make HistoryDatabase own StarredURLDatabase instead of inheriting from it.
This switches HistoryDatabase to composition, so the clients doesn't have to
depend/include starred_url_database.h anymore.
NOTE: This was a TODO for sky@.
R=sky@chromium.org
Review URL: http://codereview.chromium.org/8550006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/history_database.cc')
-rw-r--r-- | chrome/browser/history/history_database.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/history/history_database.cc b/chrome/browser/history/history_database.cc index 32c2cc3..18bb489 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; |