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

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

Issue 10870029: Remove legacy migration code that coupled history and bookmarks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More android fixes. Created 8 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/history/history_database.h ('k') | chrome/browser/history/history_database_unittest.cc » ('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 354ac1ad3801c06ab16a1644041c2385125ff2a0..f875d1390093739841eadb9a5e04e3f297c8b4ce 100644
--- a/chrome/browser/history/history_database.cc
+++ b/chrome/browser/history/history_database.cc
@@ -14,7 +14,6 @@
#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)
@@ -68,8 +67,7 @@ HistoryDatabase::HistoryDatabase()
HistoryDatabase::~HistoryDatabase() {
}
-sql::InitStatus HistoryDatabase::Init(const FilePath& history_name,
- const FilePath& bookmarks_path) {
+sql::InitStatus HistoryDatabase::Init(const FilePath& history_name) {
// Set the exceptional sqlite error handler.
db_.set_error_delegate(GetErrorHandlerForHistoryDb());
@@ -119,7 +117,7 @@ sql::InitStatus HistoryDatabase::Init(const FilePath& history_name,
CreateKeywordSearchTermsIndices();
// Version check.
- sql::InitStatus version_status = EnsureCurrentVersion(bookmarks_path);
+ sql::InitStatus version_status = EnsureCurrentVersion();
if (version_status != sql::INIT_OK)
return version_status;
@@ -244,8 +242,7 @@ sql::MetaTable& HistoryDatabase::GetMetaTable() {
// Migration -------------------------------------------------------------------
-sql::InitStatus HistoryDatabase::EnsureCurrentVersion(
- const FilePath& tmp_bookmarks_path) {
+sql::InitStatus HistoryDatabase::EnsureCurrentVersion() {
// We can't read databases newer than we were designed for.
if (meta_table_.GetCompatibleVersionNumber() > kCurrentVersionNumber) {
LOG(WARNING) << "History database is too new.";
@@ -263,9 +260,7 @@ sql::InitStatus HistoryDatabase::EnsureCurrentVersion(
// Put migration code here
if (cur_version == 15) {
- StarredURLDatabase starred_url_database(&db_);
- if (!starred_url_database.MigrateBookmarksToFile(tmp_bookmarks_path) ||
- !DropStarredIDFromURLs()) {
+ if (!db_.Execute("DROP TABLE starred") || !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/history_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698