Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: content/browser/service_worker/service_worker_read_from_cache_job.cc

Issue 508433002: Remove implicit conversions from scoped_refptr to T* in content/browser/service_worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_read_from_cache_job.h" 5 #include "content/browser/service_worker/service_worker_read_from_cache_job.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "content/browser/service_worker/service_worker_context_core.h" 10 #include "content/browser/service_worker/service_worker_context_core.h"
(...skipping 29 matching lines...) Expand all
40 NotifyStartError(net::URLRequestStatus( 40 NotifyStartError(net::URLRequestStatus(
41 net::URLRequestStatus::FAILED, net::ERR_FAILED)); 41 net::URLRequestStatus::FAILED, net::ERR_FAILED));
42 return; 42 return;
43 } 43 }
44 44
45 // Create a response reader and start reading the headers, 45 // Create a response reader and start reading the headers,
46 // we'll continue when thats done. 46 // we'll continue when thats done.
47 reader_ = context_->storage()->CreateResponseReader(response_id_); 47 reader_ = context_->storage()->CreateResponseReader(response_id_);
48 http_info_io_buffer_ = new HttpResponseInfoIOBuffer; 48 http_info_io_buffer_ = new HttpResponseInfoIOBuffer;
49 reader_->ReadInfo( 49 reader_->ReadInfo(
50 http_info_io_buffer_, 50 http_info_io_buffer_.get(),
51 base::Bind(&ServiceWorkerReadFromCacheJob::OnReadInfoComplete, 51 base::Bind(&ServiceWorkerReadFromCacheJob::OnReadInfoComplete,
52 weak_factory_.GetWeakPtr())); 52 weak_factory_.GetWeakPtr()));
53 SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0)); 53 SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
54 } 54 }
55 55
56 void ServiceWorkerReadFromCacheJob::Kill() { 56 void ServiceWorkerReadFromCacheJob::Kill() {
57 if (has_been_killed_) 57 if (has_been_killed_)
58 return; 58 return;
59 weak_factory_.InvalidateWeakPtrs(); 59 weak_factory_.InvalidateWeakPtrs();
60 has_been_killed_ = true; 60 has_been_killed_ = true;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result)); 185 NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result));
186 } else { 186 } else {
187 check_result = ServiceWorkerMetrics::READ_OK; 187 check_result = ServiceWorkerMetrics::READ_OK;
188 SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status 188 SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status
189 } 189 }
190 ServiceWorkerMetrics::CountReadResponseResult(check_result); 190 ServiceWorkerMetrics::CountReadResponseResult(check_result);
191 NotifyReadComplete(result); 191 NotifyReadComplete(result);
192 } 192 }
193 193
194 } // namespace content 194 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698