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

Side by Side Diff: net/cert_net/cert_net_fetcher_impl.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 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
« no previous file with comments | « net/base/network_change_notifier_win.h ('k') | net/disk_cache/blockfile/backend_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "net/cert_net/cert_net_fetcher_impl.h" 5 #include "net/cert_net/cert_net_fetcher_impl.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/containers/linked_list.h" 8 #include "base/containers/linked_list.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/numerics/safe_math.h" 10 #include "base/numerics/safe_math.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 // The URLRequest response information. 211 // The URLRequest response information.
212 std::vector<uint8_t> response_body_; 212 std::vector<uint8_t> response_body_;
213 Error result_net_error_; 213 Error result_net_error_;
214 214
215 scoped_ptr<URLRequest> url_request_; 215 scoped_ptr<URLRequest> url_request_;
216 scoped_refptr<IOBuffer> read_buffer_; 216 scoped_refptr<IOBuffer> read_buffer_;
217 217
218 // Used to timeout the job when the URLRequest takes too long. This timer is 218 // Used to timeout the job when the URLRequest takes too long. This timer is
219 // also used for notifying a failure to start the URLRequest. 219 // also used for notifying a failure to start the URLRequest.
220 base::OneShotTimer<Job> timer_; 220 base::OneShotTimer timer_;
221 221
222 // Non-owned pointer to the CertNetFetcherImpl that created this job. 222 // Non-owned pointer to the CertNetFetcherImpl that created this job.
223 CertNetFetcherImpl* parent_; 223 CertNetFetcherImpl* parent_;
224 224
225 DISALLOW_COPY_AND_ASSIGN(Job); 225 DISALLOW_COPY_AND_ASSIGN(Job);
226 }; 226 };
227 227
228 CertNetFetcherImpl::RequestImpl::~RequestImpl() { 228 CertNetFetcherImpl::RequestImpl::~RequestImpl() {
229 if (job_) 229 if (job_)
230 job_->DetachRequest(this); 230 job_->DetachRequest(this);
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 void CertNetFetcherImpl::ClearCurrentlyCompletingJob(Job* job) { 545 void CertNetFetcherImpl::ClearCurrentlyCompletingJob(Job* job) {
546 DCHECK_EQ(currently_completing_job_, job); 546 DCHECK_EQ(currently_completing_job_, job);
547 currently_completing_job_ = nullptr; 547 currently_completing_job_ = nullptr;
548 } 548 }
549 549
550 bool CertNetFetcherImpl::IsCurrentlyCompletingJob(Job* job) { 550 bool CertNetFetcherImpl::IsCurrentlyCompletingJob(Job* job) {
551 return job == currently_completing_job_; 551 return job == currently_completing_job_;
552 } 552 }
553 553
554 } // namespace net 554 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_win.h ('k') | net/disk_cache/blockfile/backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698