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

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

Issue 1751603002: [Downloads] Rework how hashes are calculated for download files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 b901ce4e40c5c691dbeba374bef1e397ba1891ee..12f0b9ea6011adbf40b5a1f8487e95e0665bdf59 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -264,19 +264,13 @@ void DownloadHistory::QueryCallback(scoped_ptr<InfoVector> infos) {
it != infos->end(); ++it) {
loading_id_ = history::ToContentDownloadId(it->id);
content::DownloadItem* item = notifier_.GetManager()->CreateDownloadItem(
- loading_id_,
- it->current_path,
- it->target_path,
- it->url_chain,
- it->referrer_url,
- it->mime_type,
- it->original_mime_type,
- it->start_time,
- it->end_time,
- it->etag,
- it->last_modified,
- it->received_bytes,
+ loading_id_, it->current_path, it->target_path, it->url_chain,
+ it->referrer_url, it->mime_type, it->original_mime_type, it->start_time,
+ it->end_time, it->etag, it->last_modified, it->received_bytes,
it->total_bytes,
+ std::string(), // TODO(asanka): Need to persist and restore hash of
asanka 2016/03/04 22:08:06 svaldez: This along with history DB changes are co
+ // partial file for an interrupted download. No need to
+ // store hash for a completed file.
history::ToContentDownloadState(it->state),
history::ToContentDownloadDangerType(it->danger_type),
history::ToContentDownloadInterruptReason(it->interrupt_reason),

Powered by Google App Engine
This is Rietveld 408576698