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

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

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.h
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index f7915d739ec5659580d99b78f2d0f9519186e60c..557cec706c6537b3b225ead7412c4dedd480c843 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -130,6 +130,7 @@ class CONTENT_EXPORT DownloadItemImpl
const GURL& GetTabUrl() const override;
const GURL& GetTabReferrerUrl() const override;
std::string GetSuggestedFilename() const override;
+ int GetResponseCode() const override;
std::string GetContentDisposition() const override;
std::string GetMimeType() const override;
std::string GetOriginalMimeType() const override;
@@ -568,7 +569,12 @@ class CONTENT_EXPORT DownloadItemImpl
// Whether the download was triggered with a user gesture.
bool has_user_gesture_ = false;
- // Information from the request.
+ // Information from the response.
+
+ // The HTTP response code. This is 0 when the response has not yet been
+ // received or if the response code text could not be parsed.
+ int response_code_ = 0;
+
// Content-disposition field from the header.
std::string content_disposition_;

Powered by Google App Engine
This is Rietveld 408576698