| Index: content/browser/service_worker/service_worker_url_request_job.h
|
| diff --git a/content/browser/service_worker/service_worker_url_request_job.h b/content/browser/service_worker/service_worker_url_request_job.h
|
| index dbbba108df09c9d2e08f4e2a6ac76c5e57354086..61a835db8004e77c891d8d6b624766d3de8837cf 100644
|
| --- a/content/browser/service_worker/service_worker_url_request_job.h
|
| +++ b/content/browser/service_worker/service_worker_url_request_job.h
|
| @@ -17,11 +17,13 @@
|
| #include "net/url_request/url_request_job.h"
|
|
|
| namespace webkit_blob {
|
| +class BlobDataHandle;
|
| class BlobStorageContext;
|
| }
|
|
|
| namespace content {
|
|
|
| +class ResourceRequestBody;
|
| class ServiceWorkerContextCore;
|
| class ServiceWorkerFetchDispatcher;
|
| class ServiceWorkerProviderHost;
|
| @@ -34,7 +36,8 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
| net::URLRequest* request,
|
| net::NetworkDelegate* network_delegate,
|
| base::WeakPtr<ServiceWorkerProviderHost> provider_host,
|
| - base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context);
|
| + base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context,
|
| + scoped_refptr<ResourceRequestBody> body);
|
|
|
| // Sets the response type.
|
| void FallbackToNetwork();
|
| @@ -100,6 +103,14 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
| void MaybeStartRequest();
|
| void StartRequest();
|
|
|
| + // Creates ServiceWorkerFetchRequest from |request_| and |body_|.
|
| + scoped_ptr<ServiceWorkerFetchRequest> CreateFetchRequest();
|
| +
|
| + // Creates BlobDataHandle of the request body from |body_|. This handle
|
| + // |request_body_blob_data_handle_| will be deleted when
|
| + // ServiceWorkerURLRequestJob is deleted.
|
| + bool CreateRequestBodyBlob(std::string* blob_uuid, uint64* blob_size);
|
| +
|
| // For FORWARD_TO_SERVICE_WORKER case.
|
| void DidDispatchFetchEvent(ServiceWorkerStatusCode status,
|
| ServiceWorkerFetchEventResult fetch_result,
|
| @@ -133,6 +144,10 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
| scoped_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_;
|
| base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context_;
|
| scoped_ptr<net::URLRequest> blob_request_;
|
| + // ResourceRequestBody has a collection of BlobDataHandles attached to it
|
| + // using the userdata mechanism. So we have to keep it not to free the blobs.
|
| + scoped_refptr<ResourceRequestBody> body_;
|
| + scoped_ptr<webkit_blob::BlobDataHandle> request_body_blob_data_handle_;
|
|
|
| base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
|
|
|
|
|