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 38b040d3168ea09c4ba714b6bbd441f766249e94..104da86548ea117108ff2204dab9074f1d2683a4 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 |
@@ -14,11 +14,13 @@ |
#include "content/common/service_worker/service_worker_status_code.h" |
#include "content/common/service_worker/service_worker_types.h" |
#include "content/public/common/resource_type.h" |
+#include "net/base/net_errors.h" |
#include "net/url_request/url_request.h" |
#include "net/url_request/url_request_job.h" |
namespace content { |
+class ServiceWorkerCacheWriter; |
class ServiceWorkerContextCore; |
class ServiceWorkerResponseWriter; |
Randy Smith (Not in Mondays)
2015/09/01 20:35:42
This doesn't look necessary to me, since it's decl
Elly Fong-Jones
2015/09/09 13:36:09
Done.
|
class ServiceWorkerVersions; |
@@ -57,10 +59,6 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob |
UpdateAfter24Hours); |
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
UpdateForceBypassCache); |
- class NetDataConsumer; |
- class PassThroughConsumer; |
- class Comparer; |
- class Copier; |
~ServiceWorkerWriteToCacheJob() override; |
@@ -85,14 +83,8 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob |
int buf_size, |
int* bytes_read); |
- void CommitHeadersAndNotifyHeadersComplete(); |
- void WriteHeaders(const base::Closure& callback); |
- void OnWriteHeadersComplete(const base::Closure& callback, int result); |
- void WriteData(net::IOBuffer* buf, |
- int amount_to_write, |
- const base::Callback<void(int result)>& callback); |
- void OnWriteDataComplete(const base::Callback<void(int result)>& callback, |
- int result); |
+ void OnWriteHeadersComplete(net::Error error); |
Randy Smith (Not in Mondays)
2015/09/01 20:35:42
I know it's in the private section, and hence part
Elly Fong-Jones
2015/09/09 13:36:09
Done.
|
+ void OnWriteDataComplete(net::Error error); |
// net::URLRequest::Delegate overrides that observe the net request. |
void OnReceivedRedirect(net::URLRequest* request, |
@@ -112,12 +104,6 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob |
bool CheckPathRestriction(net::URLRequest* request); |
- void SetPendingIO(); |
- void ClearPendingIO(); |
- void OnPassThroughComplete(); |
- void OnCompareComplete(int bytes_matched, bool is_equal); |
- void CopyIncumbent(int bytes_to_copy); |
- void OnCopyComplete(ServiceWorkerStatusCode status); |
void HandleNetData(int bytes_read); |
void AsyncNotifyDoneHelper(const net::URLRequestStatus& status, |
@@ -126,6 +112,9 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob |
void NotifyFinishedCaching(net::URLRequestStatus status, |
const std::string& status_message); |
+ scoped_ptr<ServiceWorkerResponseReader> CreateResponseReader(); |
Randy Smith (Not in Mondays)
2015/09/01 20:35:42
nit, suggestion: Given that the response reader an
Elly Fong-Jones
2015/09/09 13:36:08
Done.
|
+ scoped_ptr<ServiceWorkerResponseWriter> CreateResponseWriter(); |
+ |
ResourceType resource_type_; // Differentiate main script and imports |
scoped_refptr<net::IOBuffer> io_buffer_; |
int io_buffer_bytes_; |
@@ -137,7 +126,7 @@ class CONTENT_EXPORT ServiceWorkerWriteToCacheJob |
scoped_ptr<net::HttpResponseInfo> http_info_; |
scoped_ptr<ServiceWorkerResponseWriter> writer_; |
scoped_refptr<ServiceWorkerVersion> version_; |
- scoped_ptr<NetDataConsumer> consumer_; |
+ scoped_ptr<ServiceWorkerCacheWriter> cache_writer_; |
bool has_been_killed_; |
bool did_notify_started_; |
bool did_notify_finished_; |