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

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

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 years 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/base/keygen_handler_win.cc ('k') | net/ssl/client_cert_store_win.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) 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/test_root_certs.h" 5 #include "net/cert/test_root_certs.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Ensure that the default CryptoAPI functionality has been intercepted. 141 // Ensure that the default CryptoAPI functionality has been intercepted.
142 // If a test certificate is never added, then no interception should 142 // If a test certificate is never added, then no interception should
143 // happen. 143 // happen.
144 g_capi_injector.Get(); 144 g_capi_injector.Get();
145 145
146 BOOL ok = CertAddCertificateContextToStore( 146 BOOL ok = CertAddCertificateContextToStore(
147 temporary_roots_, certificate->os_cert_handle(), 147 temporary_roots_, certificate->os_cert_handle(),
148 CERT_STORE_ADD_NEW, NULL); 148 CERT_STORE_ADD_NEW, NULL);
149 if (!ok) { 149 if (!ok) {
150 // If the certificate is already added, return successfully. 150 // If the certificate is already added, return successfully.
151 return GetLastError() == CRYPT_E_EXISTS; 151 return GetLastError() == static_cast<DWORD>(CRYPT_E_EXISTS);
152 } 152 }
153 153
154 empty_ = false; 154 empty_ = false;
155 return true; 155 return true;
156 } 156 }
157 157
158 void TestRootCerts::Clear() { 158 void TestRootCerts::Clear() {
159 empty_ = true; 159 empty_ = true;
160 160
161 for (PCCERT_CONTEXT prev_cert = 161 for (PCCERT_CONTEXT prev_cert =
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 void TestRootCerts::Init() { 205 void TestRootCerts::Init() {
206 empty_ = true; 206 empty_ = true;
207 temporary_roots_ = CertOpenStore( 207 temporary_roots_ = CertOpenStore(
208 CERT_STORE_PROV_MEMORY, 0, NULL, 208 CERT_STORE_PROV_MEMORY, 0, NULL,
209 CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG, NULL); 209 CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG, NULL);
210 DCHECK(temporary_roots_); 210 DCHECK(temporary_roots_);
211 } 211 }
212 212
213 } // namespace net 213 } // namespace net
OLDNEW
« no previous file with comments | « net/base/keygen_handler_win.cc ('k') | net/ssl/client_cert_store_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698