Index: storage/browser/blob/blob_url_request_job.h |
diff --git a/storage/browser/blob/blob_url_request_job.h b/storage/browser/blob/blob_url_request_job.h |
index 4d83d60322d0c3dd7880dbb646f261f8d34b7dd4..3eb264c52c9a43c5e17036d9ab8b71a8d5912a31 100644 |
--- a/storage/browser/blob/blob_url_request_job.h |
+++ b/storage/browser/blob/blob_url_request_job.h |
@@ -24,6 +24,7 @@ class SingleThreadTaskRunner; |
} |
namespace net { |
+class HttpResponseHeaders; |
class IOBuffer; |
} |
@@ -51,6 +52,19 @@ class STORAGE_EXPORT BlobURLRequestJob |
void GetResponseInfo(net::HttpResponseInfo* info) override; |
void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; |
+ // Helper method to create the HTTP headers for the response. |
+ // |blob_handles|, |blob_reader|, |byte_range| and |content_size| are only |
+ // used if status_code isn't an error. |
+ static scoped_refptr<net::HttpResponseHeaders> GenerateHeaders( |
+ net::HttpStatusCode status_code, |
+ BlobDataHandle* blob_handle, |
+ BlobReader* blob_reader, |
+ net::HttpByteRange* byte_range, |
+ int64_t* content_size); |
+ |
+ // Helper method to map from a net error to an http status code. |
+ static net::HttpStatusCode NetErrorToHttpStatusCode(int error_code); |
+ |
protected: |
~BlobURLRequestJob() override; |