OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/multi_threaded_cert_verifier.h" | 5 #include "net/cert/multi_threaded_cert_verifier.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 | 331 |
332 bool is_first_job_; | 332 bool is_first_job_; |
333 base::WeakPtrFactory<CertVerifierJob> weak_ptr_factory_; | 333 base::WeakPtrFactory<CertVerifierJob> weak_ptr_factory_; |
334 }; | 334 }; |
335 | 335 |
336 MultiThreadedCertVerifier::MultiThreadedCertVerifier( | 336 MultiThreadedCertVerifier::MultiThreadedCertVerifier( |
337 CertVerifyProc* verify_proc) | 337 CertVerifyProc* verify_proc) |
338 : requests_(0), inflight_joins_(0), verify_proc_(verify_proc) {} | 338 : requests_(0), inflight_joins_(0), verify_proc_(verify_proc) {} |
339 | 339 |
340 MultiThreadedCertVerifier::~MultiThreadedCertVerifier() { | 340 MultiThreadedCertVerifier::~MultiThreadedCertVerifier() { |
341 STLDeleteElements(&inflight_); | 341 base::STLDeleteElements(&inflight_); |
342 } | 342 } |
343 | 343 |
344 int MultiThreadedCertVerifier::Verify(const RequestParams& params, | 344 int MultiThreadedCertVerifier::Verify(const RequestParams& params, |
345 CRLSet* crl_set, | 345 CRLSet* crl_set, |
346 CertVerifyResult* verify_result, | 346 CertVerifyResult* verify_result, |
347 const CompletionCallback& callback, | 347 const CompletionCallback& callback, |
348 std::unique_ptr<Request>* out_req, | 348 std::unique_ptr<Request>* out_req, |
349 const BoundNetLog& net_log) { | 349 const BoundNetLog& net_log) { |
350 out_req->reset(); | 350 out_req->reset(); |
351 | 351 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // The JobSet is kept in sorted order so items can be found using binary | 417 // The JobSet is kept in sorted order so items can be found using binary |
418 // search. | 418 // search. |
419 auto it = std::lower_bound(inflight_.begin(), inflight_.end(), key, | 419 auto it = std::lower_bound(inflight_.begin(), inflight_.end(), key, |
420 JobToRequestParamsComparator()); | 420 JobToRequestParamsComparator()); |
421 if (it != inflight_.end() && !(key < (*it)->key())) | 421 if (it != inflight_.end() && !(key < (*it)->key())) |
422 return *it; | 422 return *it; |
423 return nullptr; | 423 return nullptr; |
424 } | 424 } |
425 | 425 |
426 } // namespace net | 426 } // namespace net |
OLD | NEW |