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

Side by Side Diff: net/base/ssl_config_service.cc

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/base/net_util.cc ('k') | net/base/test_root_certs.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/base/crl_set.h" 9 #include "net/base/crl_set.h"
10 #include "net/base/ssl_config_service_defaults.h" 10 #include "net/base/ssl_config_service_defaults.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const std::string& hostname) { 57 const std::string& hostname) {
58 return SSLFalseStartBlacklist::IsMember(hostname); 58 return SSLFalseStartBlacklist::IsMember(hostname);
59 } 59 }
60 60
61 static bool g_cached_info_enabled = false; 61 static bool g_cached_info_enabled = false;
62 static bool g_origin_bound_certs_enabled = false; 62 static bool g_origin_bound_certs_enabled = false;
63 static bool g_false_start_enabled = true; 63 static bool g_false_start_enabled = true;
64 static bool g_dns_cert_provenance_checking = false; 64 static bool g_dns_cert_provenance_checking = false;
65 base::LazyInstance<scoped_refptr<CRLSet>, 65 base::LazyInstance<scoped_refptr<CRLSet>,
66 base::LeakyLazyInstanceTraits<scoped_refptr<CRLSet> > > 66 base::LeakyLazyInstanceTraits<scoped_refptr<CRLSet> > >
67 g_crl_set(base::LINKER_INITIALIZED); 67 g_crl_set = LAZY_INSTANCE_INITIALIZER;
68 68
69 // static 69 // static
70 void SSLConfigService::DisableFalseStart() { 70 void SSLConfigService::DisableFalseStart() {
71 g_false_start_enabled = false; 71 g_false_start_enabled = false;
72 } 72 }
73 73
74 // static 74 // static
75 bool SSLConfigService::false_start_enabled() { 75 bool SSLConfigService::false_start_enabled() {
76 return g_false_start_enabled; 76 return g_false_start_enabled;
77 } 77 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) { 152 bool SSLConfigService::IsSNIAvailable(SSLConfigService* service) {
153 if (!service) 153 if (!service)
154 return false; 154 return false;
155 155
156 SSLConfig ssl_config; 156 SSLConfig ssl_config;
157 service->GetSSLConfig(&ssl_config); 157 service->GetSSLConfig(&ssl_config);
158 return ssl_config.tls1_enabled; 158 return ssl_config.tls1_enabled;
159 } 159 }
160 160
161 } // namespace net 161 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_util.cc ('k') | net/base/test_root_certs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698