Index: content/browser/service_worker/service_worker_write_to_cache_job.cc |
diff --git a/content/browser/service_worker/service_worker_write_to_cache_job.cc b/content/browser/service_worker/service_worker_write_to_cache_job.cc |
index d9f996261a38b4a88f1a556fe74c94505f3ae966..75e6b62f331eed84392242acac605b20d464fabf 100644 |
--- a/content/browser/service_worker/service_worker_write_to_cache_job.cc |
+++ b/content/browser/service_worker/service_worker_write_to_cache_job.cc |
@@ -69,6 +69,7 @@ void ServiceWorkerWriteToCacheJob::Kill() { |
if (did_notify_started_ && !did_notify_finished_) { |
version_->script_cache_map()->NotifyFinishedCaching( |
url_, |
+ -1, |
net::URLRequestStatus(net::URLRequestStatus::FAILED, net::ERR_ABORTED)); |
did_notify_finished_ = true; |
} |
@@ -129,7 +130,7 @@ bool ServiceWorkerWriteToCacheJob::ReadRawData( |
// No more data to process, the job is complete. |
io_buffer_ = NULL; |
version_->script_cache_map()->NotifyFinishedCaching( |
- url_, net::URLRequestStatus()); |
+ url_, writer_->amount_written(), net::URLRequestStatus()); |
did_notify_finished_ = true; |
return status.is_success(); |
} |
@@ -183,7 +184,7 @@ net::URLRequestStatus ServiceWorkerWriteToCacheJob::ReadNetData( |
DCHECK(!net_request_->status().is_success()); |
return net_request_->status(); |
} |
- |
+ *bytes_read = net_bytes_read; |
michaeln
2014/10/17 02:01:40
I don't think be here when net_bytes_read > 0. Fro
michaeln
2014/10/17 20:16:20
I'm just saying that this newly added line 187 doe
dmurph
2014/10/17 22:55:19
Done.
|
if (net_bytes_read != 0) { |
WriteDataToCache(net_bytes_read); |
DCHECK(GetStatus().is_io_pending()); |
@@ -381,7 +382,8 @@ void ServiceWorkerWriteToCacheJob::OnReadCompleted( |
void ServiceWorkerWriteToCacheJob::AsyncNotifyDoneHelper( |
const net::URLRequestStatus& status) { |
DCHECK(!status.is_io_pending()); |
- version_->script_cache_map()->NotifyFinishedCaching(url_, status); |
+ version_->script_cache_map()->NotifyFinishedCaching( |
+ url_, writer_->amount_written(), status); |
did_notify_finished_ = true; |
SetStatus(status); |
NotifyDone(status); |