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

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

Issue 2809953002: Make the download's response headers available in the DownloadItem (Closed)
Patch Set: headers 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..58439de84ff7ae19d55b581a4a026be7ccdaa399 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,11 @@ 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. Only for consuming headers.
+ virtual const scoped_refptr<const net::HttpResponseHeaders>&
David Trainor- moved to gerrit 2017/04/11 22:06:40 Maybe mention that this isn't persisted, so it wil
Peter Beverloo 2017/04/11 22:22:27 Done.
+ 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