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

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

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thakis comment, renamed LAZY_INSTANCE_INITIALIZER 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
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/ev_root_ca_metadata.h" 5 #include "net/base/ev_root_ca_metadata.h"
6 6
7 #if defined(USE_NSS) 7 #if defined(USE_NSS)
8 #include <cert.h> 8 #include <cert.h>
9 #include <pkcs11n.h> 9 #include <pkcs11n.h>
10 #include <secerr.h> 10 #include <secerr.h>
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 "2.16.840.1.114171.500.9", 309 "2.16.840.1.114171.500.9",
310 "2.16.840.1.114404.1.1.2.4.1", 310 "2.16.840.1.114404.1.1.2.4.1",
311 "2.16.840.1.114412.2.1", 311 "2.16.840.1.114412.2.1",
312 "2.16.840.1.114413.1.7.23.3", 312 "2.16.840.1.114413.1.7.23.3",
313 "2.16.840.1.114414.1.7.23.3", 313 "2.16.840.1.114414.1.7.23.3",
314 }; 314 };
315 #endif 315 #endif
316 316
317 static base::LazyInstance<EVRootCAMetadata, 317 static base::LazyInstance<EVRootCAMetadata,
318 base::LeakyLazyInstanceTraits<EVRootCAMetadata> > 318 base::LeakyLazyInstanceTraits<EVRootCAMetadata> >
319 g_ev_root_ca_metadata(base::LINKER_INITIALIZED); 319 g_ev_root_ca_metadata = LAZY_INSTANCE_INITIALIZER;
320 320
321 // static 321 // static
322 EVRootCAMetadata* EVRootCAMetadata::GetInstance() { 322 EVRootCAMetadata* EVRootCAMetadata::GetInstance() {
323 return g_ev_root_ca_metadata.Pointer(); 323 return g_ev_root_ca_metadata.Pointer();
324 } 324 }
325 325
326 bool EVRootCAMetadata::GetPolicyOIDsForCA( 326 bool EVRootCAMetadata::GetPolicyOIDsForCA(
327 const SHA1Fingerprint& fingerprint, 327 const SHA1Fingerprint& fingerprint,
328 std::vector<PolicyOID>* policy_oids) const { 328 std::vector<PolicyOID>* policy_oids) const {
329 PolicyOidMap::const_iterator iter = ev_policy_.find(fingerprint); 329 PolicyOidMap::const_iterator iter = ev_policy_.find(fingerprint);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // static 436 // static
437 bool EVRootCAMetadata::PolicyOIDsAreEqual(PolicyOID a, PolicyOID b) { 437 bool EVRootCAMetadata::PolicyOIDsAreEqual(PolicyOID a, PolicyOID b) {
438 #if defined(USE_NSS) 438 #if defined(USE_NSS)
439 return a == b; 439 return a == b;
440 #else 440 #else
441 return !strcmp(a, b); 441 return !strcmp(a, b);
442 #endif 442 #endif
443 } 443 }
444 444
445 } // namespace net 445 } // namespace net
OLDNEW
« base/lazy_instance.cc ('K') | « net/base/dns_reloader.cc ('k') | net/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698