| 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 1c164e50e30aeb3438adacc12d0179d3fd7c7e13..3fe60a1e4f436d45163265cb757703339b35745d 100644
|
| --- a/content/browser/service_worker/service_worker_url_request_job.h
|
| +++ b/content/browser/service_worker/service_worker_url_request_job.h
|
| @@ -27,6 +27,7 @@
|
| #include "net/url_request/url_request.h"
|
| #include "net/url_request/url_request_job.h"
|
| #include "net/url_request/url_request_status.h"
|
| +#include "storage/common/blob_storage/blob_storage_constants.h"
|
| #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -166,12 +167,15 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
| void MaybeStartRequest();
|
| void StartRequest();
|
|
|
| + void DispatchToWorker();
|
| +
|
| // Creates ServiceWorkerFetchRequest from |request_| and |body_|.
|
| std::unique_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.
|
| + // This must not be called until all blobs in |body_| finished construction.
|
| bool CreateRequestBodyBlob(std::string* blob_uuid, uint64_t* blob_size);
|
|
|
| // For FORWARD_TO_SERVICE_WORKER case.
|
| @@ -217,6 +221,16 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
|
|
| bool IsMainResourceLoad() const;
|
|
|
| + // For waiting for request body blobs to finish construction.
|
| + bool HasRequestBody();
|
| + void WaitForRequestBobyBlobsToComplete();
|
| + void OneRequestBodyBlobCompleted(
|
| + bool success,
|
| + storage::IPCBlobCreationCancelCode cancel_code);
|
| + void RequestBodyBlobsCompleted(
|
| + bool success,
|
| + storage::IPCBlobCreationCancelCode cancel_code);
|
| +
|
| // Not owned.
|
| Delegate* delegate_;
|
|
|
| @@ -268,6 +282,8 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
| bool response_is_in_cache_storage_ = false;
|
| std::string response_cache_storage_cache_name_;
|
|
|
| + size_t num_pending_request_body_blobs_ = 0;
|
| +
|
| base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);
|
|
|