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

Unified Diff: content/browser/download/download_item_impl.cc

Issue 2809953002: Make the download's response headers available in the DownloadItem (Closed)
Patch Set: Created 3 years, 8 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: content/browser/download/download_item_impl.cc
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index fb6ff4a01339ddf4acc7ed3bbd155e1603e2a7e6..ec6222340617f7772c857209204c4eb7fe6f37a4 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -217,6 +217,7 @@ DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate,
transition_type_(info.transition_type ? info.transition_type.value()
: ui::PAGE_TRANSITION_LINK),
has_user_gesture_(info.has_user_gesture),
+ response_code_(info.response_code),
content_disposition_(info.content_disposition),
mime_type_(info.mime_type),
original_mime_type_(info.original_mime_type),
@@ -605,6 +606,10 @@ std::string DownloadItemImpl::GetSuggestedFilename() const {
return suggested_filename_;
}
+int DownloadItemImpl::GetResponseCode() const {
+ return response_code_;
+}
+
std::string DownloadItemImpl::GetContentDisposition() const {
return content_disposition_;
}
@@ -1043,6 +1048,7 @@ void DownloadItemImpl::UpdateValidatorsOnResumption(
url_chain_.end(), chain_iter, new_create_info.url_chain.end());
etag_ = new_create_info.etag;
last_modified_time_ = new_create_info.last_modified;
+ response_code_ = new_create_info.response_code;
content_disposition_ = new_create_info.content_disposition;
// It is possible that the previous download attempt failed right before the
// response is received. Need to reset the MIME type.
« no previous file with comments | « content/browser/download/download_item_impl.h ('k') | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698