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

Unified Diff: storage/browser/blob/blob_url_request_job.h

Issue 2906543002: Add support for reading blobs when using the network service. (Closed)
Patch Set: fix threading issue with weakptr Created 3 years, 6 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 | « storage/browser/BUILD.gn ('k') | storage/browser/blob/blob_url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « storage/browser/BUILD.gn ('k') | storage/browser/blob/blob_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698