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 #ifndef NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ | 5 #ifndef NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ |
6 #define NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ | 6 #define NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | |
16 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
17 #include "net/base/cert_database.h" | 16 #include "net/base/cert_database.h" |
18 #include "net/base/cert_verifier.h" | 17 #include "net/base/cert_verifier.h" |
19 #include "net/base/cert_verify_result.h" | 18 #include "net/base/cert_verify_result.h" |
20 #include "net/base/completion_callback.h" | 19 #include "net/base/completion_callback.h" |
21 #include "net/base/expiring_cache.h" | 20 #include "net/base/expiring_cache.h" |
22 #include "net/base/net_export.h" | 21 #include "net/base/net_export.h" |
23 #include "net/base/x509_cert_types.h" | 22 #include "net/base/x509_cert_types.h" |
24 | 23 |
25 namespace net { | 24 namespace net { |
26 | 25 |
27 class CertVerifierJob; | 26 class CertVerifierJob; |
28 class CertVerifierRequest; | 27 class CertVerifierRequest; |
29 class CertVerifierWorker; | 28 class CertVerifierWorker; |
30 class CertVerifyProc; | 29 class CertVerifyProc; |
31 | 30 |
32 // MultiThreadedCertVerifier is a CertVerifier implementation that runs | 31 // MultiThreadedCertVerifier is a CertVerifier implementation that runs |
33 // synchronous CertVerifier implementations on worker threads. | 32 // synchronous CertVerifier implementations on worker threads. |
34 class NET_EXPORT_PRIVATE MultiThreadedCertVerifier : | 33 class NET_EXPORT_PRIVATE MultiThreadedCertVerifier |
35 public CertVerifier, | 34 : public CertVerifier, |
36 NON_EXPORTED_BASE(public base::NonThreadSafe), | 35 NON_EXPORTED_BASE(public base::NonThreadSafe), |
Ryan Sleevi
2012/05/17 01:25:37
Probably should shuffle these so the N_E_B appears
Lei Zhang
2012/05/17 01:28:46
There's lots of those. Someone can probably clean
| |
37 public CertDatabase::Observer { | 36 public CertDatabase::Observer { |
38 public: | 37 public: |
39 MultiThreadedCertVerifier(); | 38 MultiThreadedCertVerifier(); |
40 | 39 |
41 // When the verifier is destroyed, all certificate verifications requests are | 40 // When the verifier is destroyed, all certificate verifications requests are |
42 // canceled, and their completion callbacks will not be called. | 41 // canceled, and their completion callbacks will not be called. |
43 virtual ~MultiThreadedCertVerifier(); | 42 virtual ~MultiThreadedCertVerifier(); |
44 | 43 |
45 // CertVerifier implementation | 44 // CertVerifier implementation |
46 virtual int Verify(X509Certificate* cert, | 45 virtual int Verify(X509Certificate* cert, |
47 const std::string& hostname, | 46 const std::string& hostname, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 uint64 inflight_joins_; | 138 uint64 inflight_joins_; |
140 | 139 |
141 scoped_refptr<CertVerifyProc> verify_proc_; | 140 scoped_refptr<CertVerifyProc> verify_proc_; |
142 | 141 |
143 DISALLOW_COPY_AND_ASSIGN(MultiThreadedCertVerifier); | 142 DISALLOW_COPY_AND_ASSIGN(MultiThreadedCertVerifier); |
144 }; | 143 }; |
145 | 144 |
146 } // namespace net | 145 } // namespace net |
147 | 146 |
148 #endif // NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ | 147 #endif // NET_BASE_MULTI_THREADED_CERT_VERIFIER_H_ |
OLD | NEW |