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

Unified Diff: chrome/browser/download/download_history.cc

Issue 833033002: Remove dependency on //content from history DownloadDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete #include 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: chrome/browser/download/download_history.cc
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc
index 9e960824d6ea007b7b4a6d3db06d8268c5263d66..3ee464c77f569bbd5226add65b11a57042918568 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -30,9 +30,10 @@
#include "base/metrics/histogram.h"
#include "chrome/browser/download/download_crx_util.h"
-#include "chrome/browser/history/download_database.h"
-#include "chrome/browser/history/download_row.h"
#include "chrome/browser/history/history_service.h"
+#include "components/history/content/browser/download_constants_utils.h"
+#include "components/history/core/browser/download_database.h"
+#include "components/history/core/browser/download_row.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
@@ -135,10 +136,10 @@ history::DownloadRow GetDownloadRow(
item->GetLastModifiedTime(),
item->GetReceivedBytes(),
item->GetTotalBytes(),
- item->GetState(),
- item->GetDangerType(),
- item->GetLastReason(),
- item->GetId(),
+ history::ToHistoryDownloadState(item->GetState()),
+ history::ToHistoryDownloadDangerType(item->GetDangerType()),
+ history::ToHistoryDownloadInterruptReason(item->GetLastReason()),
+ history::ToHistoryDownloadId(item->GetId()),
item->GetOpened(),
by_ext_id,
by_ext_name);
@@ -257,7 +258,7 @@ void DownloadHistory::QueryCallback(scoped_ptr<InfoVector> infos) {
return;
for (InfoVector::const_iterator it = infos->begin();
it != infos->end(); ++it) {
- loading_id_ = it->id;
+ loading_id_ = history::ToContentDownloadId(it->id);
content::DownloadItem* item = notifier_.GetManager()->CreateDownloadItem(
loading_id_,
it->current_path,
@@ -272,9 +273,9 @@ void DownloadHistory::QueryCallback(scoped_ptr<InfoVector> infos) {
it->last_modified,
it->received_bytes,
it->total_bytes,
- it->state,
- it->danger_type,
- it->interrupt_reason,
+ history::ToContentDownloadState(it->state),
+ history::ToContentDownloadDangerType(it->danger_type),
+ history::ToContentDownloadInterruptReason(it->interrupt_reason),
it->opened);
#if defined(ENABLE_EXTENSIONS)
if (!it->by_ext_id.empty() && !it->by_ext_name.empty()) {
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/download/download_history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698