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

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

Issue 1924473003: [Downloads] Use the initiating StoragePartition for resumption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in comment Created 4 years, 7 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 6454ebe65319db88b206bc9d8ba6845248964003..406c2919aacde3c8f5aa3e53b01d7e909c91cce7 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -128,7 +128,8 @@ history::DownloadRow GetDownloadRow(
return history::DownloadRow(
item->GetFullPath(), item->GetTargetFilePath(), item->GetUrlChain(),
- item->GetReferrerUrl(), item->GetTabUrl(), item->GetTabReferrerUrl(),
+ item->GetReferrerUrl(), item->GetSiteUrl(), item->GetTabUrl(),
+ item->GetTabReferrerUrl(),
std::string(), // HTTP method (not available yet)
item->GetMimeType(), item->GetOriginalMimeType(), item->GetStartTime(),
item->GetEndTime(), item->GetETag(), item->GetLastModifiedTime(),
@@ -143,8 +144,8 @@ history::DownloadRow GetDownloadRow(
bool ShouldUpdateHistory(const history::DownloadRow* previous,
const history::DownloadRow& current) {
- // Ignore url_chain, referrer, http_method, mime_type, original_mime_type,
- // start_time, id, guid, which don't change.
+ // Ignore url_chain, referrer, site_url, http_method, mime_type,
+ // original_mime_type, start_time, id, and guid. These fields don't change.
return ((previous == NULL) ||
(previous->current_path != current.current_path) ||
(previous->target_path != current.target_path) ||
@@ -263,9 +264,9 @@ void DownloadHistory::QueryCallback(std::unique_ptr<InfoVector> infos) {
loading_id_ = history::ToContentDownloadId(it->id);
content::DownloadItem* item = notifier_.GetManager()->CreateDownloadItem(
it->guid, loading_id_, it->current_path, it->target_path, it->url_chain,
- it->referrer_url, it->tab_url, it->tab_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,
+ it->referrer_url, it->site_url, it->tab_url, it->tab_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
// partial file for an interrupted download. No need to
// store hash for a completed file.
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_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