| Index: content/browser/appcache/appcache_url_request_job.cc
|
| diff --git a/content/browser/appcache/appcache_url_request_job.cc b/content/browser/appcache/appcache_url_request_job.cc
|
| index 87498f1499db84ec318223be7e1fb0851d7ea3bc..2563b9512921d15a751a432b69494399e890b76f 100644
|
| --- a/content/browser/appcache/appcache_url_request_job.cc
|
| +++ b/content/browser/appcache/appcache_url_request_job.cc
|
| @@ -335,7 +335,6 @@ void AppCacheURLRequestJob::SetupRangeResponse() {
|
| void AppCacheURLRequestJob::OnReadComplete(int result) {
|
| DCHECK(is_delivering_appcache_response());
|
| if (result == 0) {
|
| - NotifyDone(net::URLRequestStatus());
|
| AppCacheHistograms::CountResponseRetrieval(
|
| true, is_main_resource_, manifest_url_.GetOrigin());
|
| } else if (result < 0) {
|
| @@ -343,13 +342,10 @@ void AppCacheURLRequestJob::OnReadComplete(int result) {
|
| storage_->service()->CheckAppCacheResponse(manifest_url_, cache_id_,
|
| entry_.response_id());
|
| }
|
| - NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result));
|
| AppCacheHistograms::CountResponseRetrieval(
|
| false, is_main_resource_, manifest_url_.GetOrigin());
|
| - } else {
|
| - SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status
|
| }
|
| - NotifyReadComplete(result);
|
| + ReadRawDataComplete(result);
|
| }
|
|
|
| // net::URLRequestJob overrides ------------------------------------------------
|
| @@ -418,17 +414,14 @@ int AppCacheURLRequestJob::GetResponseCode() const {
|
| return http_info()->headers->response_code();
|
| }
|
|
|
| -bool AppCacheURLRequestJob::ReadRawData(net::IOBuffer* buf, int buf_size,
|
| - int *bytes_read) {
|
| +int AppCacheURLRequestJob::ReadRawData(net::IOBuffer* buf, int buf_size) {
|
| DCHECK(is_delivering_appcache_response());
|
| DCHECK_NE(buf_size, 0);
|
| - DCHECK(bytes_read);
|
| DCHECK(!reader_->IsReadPending());
|
| - reader_->ReadData(
|
| - buf, buf_size, base::Bind(&AppCacheURLRequestJob::OnReadComplete,
|
| - base::Unretained(this)));
|
| - SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
|
| - return false;
|
| + reader_->ReadData(buf, buf_size,
|
| + base::Bind(&AppCacheURLRequestJob::OnReadComplete,
|
| + base::Unretained(this)));
|
| + return net::ERR_IO_PENDING;
|
| }
|
|
|
| void AppCacheURLRequestJob::SetExtraRequestHeaders(
|
|
|