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

Unified Diff: components/history/core/browser/history_database.cc

Issue 849323002: Componentize HistoryDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
Index: components/history/core/browser/history_database.cc
diff --git a/chrome/browser/history/history_database.cc b/components/history/core/browser/history_database.cc
similarity index 96%
rename from chrome/browser/history/history_database.cc
rename to components/history/core/browser/history_database.cc
index 0eb7a90e2ac0f394a3d9d6fec865268c3c2e0197..2030b26875fcea6a1f63e0cdf5ee1fd2c5239a3e 100644
--- a/chrome/browser/history/history_database.cc
+++ b/components/history/core/browser/history_database.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/history/history_database.h"
+#include "components/history/core/browser/history_database.h"
#include <algorithm>
#include <set>
@@ -14,8 +14,6 @@
#include "base/rand_util.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
-#include "components/history/content/browser/download_constants_utils.h"
-#include "content/public/browser/download_interrupt_reasons.h"
#include "sql/transaction.h"
#if defined(OS_MACOSX)
@@ -35,11 +33,11 @@ const char kEarlyExpirationThresholdKey[] = "early_expiration_threshold";
} // namespace
-HistoryDatabase::HistoryDatabase()
- : DownloadDatabase(ToHistoryDownloadInterruptReason(
- content::DOWNLOAD_INTERRUPT_REASON_NONE),
- ToHistoryDownloadInterruptReason(
- content::DOWNLOAD_INTERRUPT_REASON_CRASH)) {
+HistoryDatabase::HistoryDatabase(
+ DownloadInterruptReason download_interrupt_reason_none,
+ DownloadInterruptReason download_interrupt_reason_crash)
+ : DownloadDatabase(download_interrupt_reason_none,
+ download_interrupt_reason_crash) {
}
HistoryDatabase::~HistoryDatabase() {
@@ -109,7 +107,7 @@ sql::InitStatus HistoryDatabase::Init(const base::FilePath& history_name) {
void HistoryDatabase::ComputeDatabaseMetrics(
const base::FilePath& history_name) {
- base::TimeTicks start_time = base::TimeTicks::Now();
+ base::TimeTicks start_time = base::TimeTicks::Now();
int64 file_size = 0;
if (!base::GetFileSize(history_name, &file_size))
return;

Powered by Google App Engine
This is Rietveld 408576698