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

Side by Side Diff: net/cert/cert_verify_proc_win.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 months 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
« no previous file with comments | « net/cert/cert_verify_proc_mac.cc ('k') | net/cert/ev_root_ca_metadata.h » ('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) 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/cert/cert_verify_proc_win.h" 5 #include "net/cert/cert_verify_proc_win.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 // (meaning only scoped to the process, and not stored in the registry), it 655 // (meaning only scoped to the process, and not stored in the registry), it
656 // will be used before any registry-based providers, including Microsoft's 656 // will be used before any registry-based providers, including Microsoft's
657 // default provider. 657 // default provider.
658 class RevocationInjector { 658 class RevocationInjector {
659 public: 659 public:
660 CRLSet* GetCRLSet() { return thread_local_crlset.Get(); } 660 CRLSet* GetCRLSet() { return thread_local_crlset.Get(); }
661 661
662 void SetCRLSet(CRLSet* crl_set) { thread_local_crlset.Set(crl_set); } 662 void SetCRLSet(CRLSet* crl_set) { thread_local_crlset.Set(crl_set); }
663 663
664 private: 664 private:
665 friend struct base::DefaultLazyInstanceTraits<RevocationInjector>; 665 friend struct base::LazyInstanceTraitsBase<RevocationInjector>;
666 666
667 RevocationInjector() { 667 RevocationInjector() {
668 const CRYPT_OID_FUNC_ENTRY kInterceptFunction[] = { 668 const CRYPT_OID_FUNC_ENTRY kInterceptFunction[] = {
669 {CRYPT_DEFAULT_OID, &CertDllVerifyRevocationWithCRLSet}, 669 {CRYPT_DEFAULT_OID, &CertDllVerifyRevocationWithCRLSet},
670 }; 670 };
671 BOOL ok = CryptInstallOIDFunctionAddress( 671 BOOL ok = CryptInstallOIDFunctionAddress(
672 NULL, X509_ASN_ENCODING, CRYPT_OID_VERIFY_REVOCATION_FUNC, 672 NULL, X509_ASN_ENCODING, CRYPT_OID_VERIFY_REVOCATION_FUNC,
673 arraysize(kInterceptFunction), kInterceptFunction, 673 arraysize(kInterceptFunction), kInterceptFunction,
674 CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG); 674 CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG);
675 DCHECK(ok); 675 DCHECK(ok);
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 return MapCertStatusToNetError(verify_result->cert_status); 1208 return MapCertStatusToNetError(verify_result->cert_status);
1209 1209
1210 if (ev_policy_oid && 1210 if (ev_policy_oid &&
1211 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) { 1211 CheckEV(chain_context, rev_checking_enabled, ev_policy_oid)) {
1212 verify_result->cert_status |= CERT_STATUS_IS_EV; 1212 verify_result->cert_status |= CERT_STATUS_IS_EV;
1213 } 1213 }
1214 return OK; 1214 return OK;
1215 } 1215 }
1216 1216
1217 } // namespace net 1217 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_mac.cc ('k') | net/cert/ev_root_ca_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698