| Index: content/browser/service_worker/service_worker_write_to_cache_job.h
|
| diff --git a/content/browser/service_worker/service_worker_write_to_cache_job.h b/content/browser/service_worker/service_worker_write_to_cache_job.h
|
| index deee1070fd9ce8a3c85077ba86fb01a989b3429f..694eb32fd796cb5da1af1b84d457e13e7826ac04 100644
|
| --- a/content/browser/service_worker/service_worker_write_to_cache_job.h
|
| +++ b/content/browser/service_worker/service_worker_write_to_cache_job.h
|
| @@ -64,6 +64,7 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob
|
|
|
| // net::URLRequestJob overrides
|
| void Start() override;
|
| + void StartAsync();
|
| void Kill() override;
|
| net::LoadState GetLoadState() const override;
|
| bool GetCharset(std::string* charset) override;
|
| @@ -71,7 +72,7 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob
|
| void GetResponseInfo(net::HttpResponseInfo* info) override;
|
| int GetResponseCode() const override;
|
| void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override;
|
| - bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override;
|
| + int ReadRawData(net::IOBuffer* buf, int buf_size) override;
|
|
|
| const net::HttpResponseInfo* http_info() const;
|
|
|
| @@ -114,13 +115,15 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob
|
| // status to IO_PENDING. After this function returns, if the URLRequestJob
|
| // isn't IO_PENDING, all of the data in |io_buffer_| has been written back to
|
| // the script cache if necessary.
|
| - void HandleNetData(int bytes_read);
|
| + int HandleNetData(int bytes_read);
|
|
|
| - void NotifyDoneHelper(const net::URLRequestStatus& status,
|
| - const std::string& status_message);
|
| + void NotifyStartErrorHelper(const net::URLRequestStatus& status,
|
| + const std::string& status_message);
|
|
|
| - void NotifyFinishedCaching(net::URLRequestStatus status,
|
| - const std::string& status_message);
|
| + // Returns an error code that is passed in through |status| or a new one if an
|
| + // additional error is found.
|
| + net::Error NotifyFinishedCaching(net::URLRequestStatus status,
|
| + const std::string& status_message);
|
|
|
| scoped_ptr<ServiceWorkerResponseReader> CreateCacheResponseReader();
|
| scoped_ptr<ServiceWorkerResponseWriter> CreateCacheResponseWriter();
|
| @@ -140,6 +143,7 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob
|
| bool has_been_killed_;
|
| bool did_notify_started_;
|
| bool did_notify_finished_;
|
| +
|
| base::WeakPtrFactory<ServiceWorkerWriteToCacheJob> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerWriteToCacheJob);
|
|
|