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

Unified Diff: components/history/core/browser/download_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/download_database.cc
diff --git a/components/history/core/browser/download_database.cc b/components/history/core/browser/download_database.cc
index e699bea6e4990b5c62ea9208d4cc48884bd7468a..530bd8e1cb06c06b47e2dd48f2967850018defc3 100644
--- a/components/history/core/browser/download_database.cc
+++ b/components/history/core/browser/download_database.cc
@@ -64,13 +64,13 @@ base::FilePath ColumnFilePath(sql::Statement& statement, int col) {
} // namespace
DownloadDatabase::DownloadDatabase(
- DownloadInterruptReason download_interrupt_no_reason,
- DownloadInterruptReason download_interrupt_crash)
+ DownloadInterruptReason download_interrupt_reason_none,
+ DownloadInterruptReason download_interrupt_reason_crash)
: owning_thread_set_(false),
owning_thread_(0),
in_progress_entry_cleanup_completed_(false),
- download_interrupt_no_reason_(download_interrupt_no_reason),
- download_interrupt_crash_(download_interrupt_crash) {
+ download_interrupt_reason_none_(download_interrupt_reason_none),
+ download_interrupt_reason_crash_(download_interrupt_reason_crash) {
}
DownloadDatabase::~DownloadDatabase() {
@@ -150,7 +150,7 @@ bool DownloadDatabase::MigrateDownloadsReasonPathsAndDangerType() {
" opened "
"FROM downloads_tmp"));
statement_populate.BindInt(
- 0, DownloadInterruptReasonToInt(download_interrupt_no_reason_));
+ 0, DownloadInterruptReasonToInt(download_interrupt_reason_none_));
statement_populate.BindInt(
1, DownloadDangerTypeToInt(DownloadDangerType::NOT_DANGEROUS));
if (!statement_populate.Run())
@@ -439,7 +439,8 @@ void DownloadDatabase::EnsureInProgressEntriesCleanedUp() {
sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
"UPDATE downloads SET state=?, interrupt_reason=? WHERE state=?"));
statement.BindInt(0, DownloadStateToInt(DownloadState::INTERRUPTED));
- statement.BindInt(1, DownloadInterruptReasonToInt(download_interrupt_crash_));
+ statement.BindInt(
+ 1, DownloadInterruptReasonToInt(download_interrupt_reason_crash_));
statement.BindInt(2, DownloadStateToInt(DownloadState::IN_PROGRESS));
statement.Run();
« no previous file with comments | « components/history/core/browser/download_database.h ('k') | components/history/core/browser/history_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698