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

Side by Side Diff: net/cert/multi_threaded_cert_verifier.cc

Issue 2229393003: net: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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_activity_monitor_unittest.cc ('k') | net/cert/test_root_certs_nss.cc » ('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 (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
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
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
OLDNEW
« no previous file with comments | « net/base/network_activity_monitor_unittest.cc ('k') | net/cert/test_root_certs_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698