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

Unified Diff: content/public/browser/download_item.h

Issue 2809953002: Make the download's response headers available in the DownloadItem (Closed)
Patch Set: comment 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
« no previous file with comments | « content/browser/download/download_request_core.cc ('k') | content/public/test/fake_download_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/download_item.h
diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h
index 0b712396e339b27be422f4dc5891d66036bc72f7..9b6d933c3c485261eb7146a72f279259b78a1b0f 100644
--- a/content/public/browser/download_item.h
+++ b/content/public/browser/download_item.h
@@ -25,6 +25,7 @@
#include "base/callback_forward.h"
#include "base/files/file_path.h"
+#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "base/supports_user_data.h"
#include "content/public/browser/download_danger_type.h"
@@ -39,6 +40,10 @@ class Time;
class TimeDelta;
}
+namespace net {
+class HttpResponseHeaders;
+}
+
namespace content {
class BrowserContext;
@@ -245,6 +250,13 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
// filename from the download attribute.
virtual std::string GetSuggestedFilename() const = 0;
+ // Returns the HTTP response headers. This contains a nullptr when the
+ // response has not yet been received, and, because the headers are not being
+ // persisted, only capture responses received during the lifetime of the
+ // current process and profile. Only for consuming headers.
+ virtual const scoped_refptr<const net::HttpResponseHeaders>&
+ GetResponseHeaders() const = 0;
+
// Content-Disposition header value from HTTP response.
virtual std::string GetContentDisposition() const = 0;
« no previous file with comments | « content/browser/download/download_request_core.cc ('k') | content/public/test/fake_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698