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/base/ssl_config_service.h" | 5 #include "net/base/ssl_config_service.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "net/base/crl_set.h" | 10 #include "net/base/crl_set.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 scoped_refptr<CRLSet> Get() const { | 75 scoped_refptr<CRLSet> Get() const { |
76 base::AutoLock locked(lock_); | 76 base::AutoLock locked(lock_); |
77 return crl_set_; | 77 return crl_set_; |
78 } | 78 } |
79 | 79 |
80 private: | 80 private: |
81 scoped_refptr<CRLSet> crl_set_; | 81 scoped_refptr<CRLSet> crl_set_; |
82 mutable base::Lock lock_; | 82 mutable base::Lock lock_; |
83 }; | 83 }; |
84 | 84 |
85 base::LazyInstance<GlobalCRLSet, | 85 base::LazyInstance<GlobalCRLSet>::Leaky g_crl_set = LAZY_INSTANCE_INITIALIZER; |
86 base::LeakyLazyInstanceTraits<GlobalCRLSet> > | |
87 g_crl_set = LAZY_INSTANCE_INITIALIZER; | |
88 | 86 |
89 // static | 87 // static |
90 void SSLConfigService::EnableDNSCertProvenanceChecking() { | 88 void SSLConfigService::EnableDNSCertProvenanceChecking() { |
91 g_dns_cert_provenance_checking = true; | 89 g_dns_cert_provenance_checking = true; |
92 } | 90 } |
93 | 91 |
94 // static | 92 // static |
95 bool SSLConfigService::dns_cert_provenance_checking_enabled() { | 93 bool SSLConfigService::dns_cert_provenance_checking_enabled() { |
96 return g_dns_cert_provenance_checking; | 94 return g_dns_cert_provenance_checking; |
97 } | 95 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { | 153 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { |
156 if (!service) | 154 if (!service) |
157 return false; | 155 return false; |
158 | 156 |
159 SSLConfig ssl_config; | 157 SSLConfig ssl_config; |
160 service->GetSSLConfig(&ssl_config); | 158 service->GetSSLConfig(&ssl_config); |
161 return ssl_config.tls1_enabled; | 159 return ssl_config.tls1_enabled; |
162 } | 160 } |
163 | 161 |
164 } // namespace net | 162 } // namespace net |
OLD | NEW |