OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |