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

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: Fix android compilation 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..4b58a5a0e539a460cadab5e3ae0000949d264004 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,11 +14,9 @@
#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)
+#if defined(OS_MACOSX) && !defined(OS_IOS)
#include "base/mac/mac_util.h"
#endif
@@ -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() {
@@ -76,7 +74,7 @@ sql::InitStatus HistoryDatabase::Init(const base::FilePath& history_name) {
if (!committer.Begin())
return sql::INIT_FAILURE;
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && !defined(OS_IOS)
// Exclude the history file from backups.
base::mac::SetFileBackupExclusion(history_name);
#endif
@@ -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;
« no previous file with comments | « components/history/core/browser/history_database.h ('k') | components/history/core/browser/history_database_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698