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 <tuple> | 7 #include <tuple> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 424 |
425 if (parent_) | 425 if (parent_) |
426 parent_->ClearCurrentlyCompletingJob(this); | 426 parent_->ClearCurrentlyCompletingJob(this); |
427 } | 427 } |
428 | 428 |
429 CertNetFetcherImpl::CertNetFetcherImpl(URLRequestContext* context) | 429 CertNetFetcherImpl::CertNetFetcherImpl(URLRequestContext* context) |
430 : currently_completing_job_(nullptr), context_(context) { | 430 : currently_completing_job_(nullptr), context_(context) { |
431 } | 431 } |
432 | 432 |
433 CertNetFetcherImpl::~CertNetFetcherImpl() { | 433 CertNetFetcherImpl::~CertNetFetcherImpl() { |
434 STLDeleteElements(&jobs_); | 434 base::STLDeleteElements(&jobs_); |
435 | 435 |
436 // The CertNetFetcherImpl was destroyed in a FetchCallback. Detach all | 436 // The CertNetFetcherImpl was destroyed in a FetchCallback. Detach all |
437 // remaining requests from the job so no further callbacks are called. | 437 // remaining requests from the job so no further callbacks are called. |
438 if (currently_completing_job_) | 438 if (currently_completing_job_) |
439 currently_completing_job_->Cancel(); | 439 currently_completing_job_->Cancel(); |
440 } | 440 } |
441 | 441 |
442 std::unique_ptr<CertNetFetcher::Request> CertNetFetcherImpl::FetchCaIssuers( | 442 std::unique_ptr<CertNetFetcher::Request> CertNetFetcherImpl::FetchCaIssuers( |
443 const GURL& url, | 443 const GURL& url, |
444 int timeout_milliseconds, | 444 int timeout_milliseconds, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 void CertNetFetcherImpl::ClearCurrentlyCompletingJob(Job* job) { | 547 void CertNetFetcherImpl::ClearCurrentlyCompletingJob(Job* job) { |
548 DCHECK_EQ(currently_completing_job_, job); | 548 DCHECK_EQ(currently_completing_job_, job); |
549 currently_completing_job_ = nullptr; | 549 currently_completing_job_ = nullptr; |
550 } | 550 } |
551 | 551 |
552 bool CertNetFetcherImpl::IsCurrentlyCompletingJob(Job* job) { | 552 bool CertNetFetcherImpl::IsCurrentlyCompletingJob(Job* job) { |
553 return job == currently_completing_job_; | 553 return job == currently_completing_job_; |
554 } | 554 } |
555 | 555 |
556 } // namespace net | 556 } // namespace net |
OLD | NEW |