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 12 matching lines...) Expand all Loading... |
23 #include "base/time/time.h" | 23 #include "base/time/time.h" |
24 #include "base/trace_event/trace_event.h" | 24 #include "base/trace_event/trace_event.h" |
25 #include "base/values.h" | 25 #include "base/values.h" |
26 #include "net/base/hash_value.h" | 26 #include "net/base/hash_value.h" |
27 #include "net/base/net_errors.h" | 27 #include "net/base/net_errors.h" |
28 #include "net/cert/cert_verify_proc.h" | 28 #include "net/cert/cert_verify_proc.h" |
29 #include "net/cert/cert_verify_result.h" | 29 #include "net/cert/cert_verify_result.h" |
30 #include "net/cert/crl_set.h" | 30 #include "net/cert/crl_set.h" |
31 #include "net/cert/x509_certificate.h" | 31 #include "net/cert/x509_certificate.h" |
32 #include "net/cert/x509_certificate_net_log_param.h" | 32 #include "net/cert/x509_certificate_net_log_param.h" |
33 #include "net/log/net_log.h" | 33 #include "net/log/net_log_capture_mode.h" |
34 #include "net/log/net_log_event_type.h" | 34 #include "net/log/net_log_event_type.h" |
| 35 #include "net/log/net_log_source.h" |
35 #include "net/log/net_log_source_type.h" | 36 #include "net/log/net_log_source_type.h" |
| 37 #include "net/log/net_log_with_source.h" |
36 | 38 |
37 #if defined(USE_NSS_CERTS) | 39 #if defined(USE_NSS_CERTS) |
38 #include <private/pprthred.h> // PR_DetachThread | 40 #include <private/pprthred.h> // PR_DetachThread |
39 #endif | 41 #endif |
40 | 42 |
41 namespace net { | 43 namespace net { |
42 | 44 |
| 45 class NetLogCaptureMode; |
| 46 |
43 //////////////////////////////////////////////////////////////////////////// | 47 //////////////////////////////////////////////////////////////////////////// |
44 // | 48 // |
45 // MultiThreadedCertVerifier is a thread-unsafe object which lives, dies, and is | 49 // MultiThreadedCertVerifier is a thread-unsafe object which lives, dies, and is |
46 // operated on a single thread, henceforth referred to as the "origin" thread. | 50 // operated on a single thread, henceforth referred to as the "origin" thread. |
47 // | 51 // |
48 // When an incoming Verify() request is received, MultiThreadedCertVerifier | 52 // When an incoming Verify() request is received, MultiThreadedCertVerifier |
49 // checks if there is an outstanding "job" (CertVerifierJob) in progress that | 53 // checks if there is an outstanding "job" (CertVerifierJob) in progress that |
50 // can service the request. If there is, the request is attached to that job. | 54 // can service the request. If there is, the request is attached to that job. |
51 // Otherwise a new job is started. | 55 // Otherwise a new job is started. |
52 // | 56 // |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 // The JobSet is kept in sorted order so items can be found using binary | 424 // The JobSet is kept in sorted order so items can be found using binary |
421 // search. | 425 // search. |
422 auto it = std::lower_bound(inflight_.begin(), inflight_.end(), key, | 426 auto it = std::lower_bound(inflight_.begin(), inflight_.end(), key, |
423 JobToRequestParamsComparator()); | 427 JobToRequestParamsComparator()); |
424 if (it != inflight_.end() && !(key < (*it)->key())) | 428 if (it != inflight_.end() && !(key < (*it)->key())) |
425 return *it; | 429 return *it; |
426 return nullptr; | 430 return nullptr; |
427 } | 431 } |
428 | 432 |
429 } // namespace net | 433 } // namespace net |
OLD | NEW |