| 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 f0a24adfa29f3d9e9ec7267ad15ef4b90311781a..b976005866fabb82a17f4445e7bf3bb70bc85557 100644
|
| --- a/content/browser/service_worker/service_worker_url_request_job.h
|
| +++ b/content/browser/service_worker/service_worker_url_request_job.h
|
| @@ -10,21 +10,25 @@
|
| #include "content/common/service_worker/service_worker_status_code.h"
|
| #include "content/common/service_worker/service_worker_types.h"
|
| #include "net/http/http_byte_range.h"
|
| +#include "net/url_request/url_request.h"
|
| #include "net/url_request/url_request_job.h"
|
|
|
| namespace content {
|
|
|
| +class ChromeBlobStorageContext;
|
| class ServiceWorkerContextCore;
|
| class ServiceWorkerFetchDispatcher;
|
| class ServiceWorkerProviderHost;
|
|
|
| class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
| - : public net::URLRequestJob {
|
| + : public net::URLRequestJob,
|
| + public net::URLRequest::Delegate {
|
| public:
|
| ServiceWorkerURLRequestJob(
|
| net::URLRequest* request,
|
| net::NetworkDelegate* network_delegate,
|
| - base::WeakPtr<ServiceWorkerProviderHost> provider_host);
|
| + base::WeakPtr<ServiceWorkerProviderHost> provider_host,
|
| + const scoped_refptr<ChromeBlobStorageContext> blob_storage_context);
|
|
|
| // Sets the response type.
|
| void FallbackToNetwork();
|
| @@ -51,6 +55,25 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
| int buf_size,
|
| int *bytes_read) OVERRIDE;
|
|
|
| + // net::URLRequest::Delegate overrides that read the blob from the
|
| + // ServiceWorkerFetchResponse.
|
| + virtual void OnReceivedRedirect(net::URLRequest* request,
|
| + const GURL& new_url,
|
| + bool* defer_redirect) OVERRIDE;
|
| + virtual void OnAuthRequired(net::URLRequest* request,
|
| + net::AuthChallengeInfo* auth_info) OVERRIDE;
|
| + virtual void OnCertificateRequested(
|
| + net::URLRequest* request,
|
| + net::SSLCertRequestInfo* cert_request_info) OVERRIDE;
|
| + virtual void OnSSLCertificateError(net::URLRequest* request,
|
| + const net::SSLInfo& ssl_info,
|
| + bool fatal) OVERRIDE;
|
| + virtual void OnBeforeNetworkStart(net::URLRequest* request,
|
| + bool* defer) OVERRIDE;
|
| + virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE;
|
| + virtual void OnReadCompleted(net::URLRequest* request,
|
| + int bytes_read) OVERRIDE;
|
| +
|
| const net::HttpResponseInfo* http_info() const;
|
|
|
| protected:
|
| @@ -86,6 +109,8 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob
|
|
|
| // Used when response type is FORWARD_TO_SERVICE_WORKER.
|
| scoped_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_;
|
| + scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
|
| + scoped_ptr<net::URLRequest> blob_request_;
|
|
|
| base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
|
|
|
|
|