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_CERT_TEST_ROOT_CERTS_H_ | 5 #ifndef NET_CERT_TEST_ROOT_CERTS_H_ |
6 #define NET_CERT_TEST_ROOT_CERTS_H_ | 6 #define NET_CERT_TEST_ROOT_CERTS_H_ |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 HCERTSTORE temporary_roots() const { return temporary_roots_; } | 87 HCERTSTORE temporary_roots() const { return temporary_roots_; } |
88 | 88 |
89 // Returns an HCERTCHAINENGINE suitable to be used for certificate | 89 // Returns an HCERTCHAINENGINE suitable to be used for certificate |
90 // validation routines, or NULL to indicate that the default system chain | 90 // validation routines, or NULL to indicate that the default system chain |
91 // engine is appropriate. The caller is responsible for freeing the | 91 // engine is appropriate. The caller is responsible for freeing the |
92 // returned HCERTCHAINENGINE. | 92 // returned HCERTCHAINENGINE. |
93 HCERTCHAINENGINE GetChainEngine() const; | 93 HCERTCHAINENGINE GetChainEngine() const; |
94 #endif | 94 #endif |
95 | 95 |
96 private: | 96 private: |
97 friend struct base::DefaultLazyInstanceTraits<TestRootCerts>; | 97 friend struct base::LazyInstanceTraitsBase<TestRootCerts>; |
98 | 98 |
99 TestRootCerts(); | 99 TestRootCerts(); |
100 ~TestRootCerts(); | 100 ~TestRootCerts(); |
101 | 101 |
102 // Performs platform-dependent initialization. | 102 // Performs platform-dependent initialization. |
103 void Init(); | 103 void Init(); |
104 | 104 |
105 #if defined(USE_NSS_CERTS) | 105 #if defined(USE_NSS_CERTS) |
106 // TrustEntry is used to store the original CERTCertificate and CERTCertTrust | 106 // TrustEntry is used to store the original CERTCertificate and CERTCertTrust |
107 // for a certificate whose trust status has been changed by the | 107 // for a certificate whose trust status has been changed by the |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 private: | 167 private: |
168 scoped_refptr<X509Certificate> cert_; | 168 scoped_refptr<X509Certificate> cert_; |
169 | 169 |
170 DISALLOW_COPY_AND_ASSIGN(ScopedTestRoot); | 170 DISALLOW_COPY_AND_ASSIGN(ScopedTestRoot); |
171 }; | 171 }; |
172 | 172 |
173 } // namespace net | 173 } // namespace net |
174 | 174 |
175 #endif // NET_CERT_TEST_ROOT_CERTS_H_ | 175 #endif // NET_CERT_TEST_ROOT_CERTS_H_ |
OLD | NEW |