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

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

Issue 12310041: experiment with -Wimplicit-fallthrough Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 6 years, 11 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 | Annotate | Revision Log
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_database.h" 5 #include "net/cert/cert_database.h"
6 6
7 #include <Security/Security.h> 7 #include <Security/Security.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/mac_logging.h" 10 #include "base/mac/mac_logging.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 int CertDatabase::AddUserCert(X509Certificate* cert) { 153 int CertDatabase::AddUserCert(X509Certificate* cert) {
154 OSStatus err; 154 OSStatus err;
155 { 155 {
156 base::AutoLock locked(crypto::GetMacSecurityServicesLock()); 156 base::AutoLock locked(crypto::GetMacSecurityServicesLock());
157 err = SecCertificateAddToKeychain(cert->os_cert_handle(), NULL); 157 err = SecCertificateAddToKeychain(cert->os_cert_handle(), NULL);
158 } 158 }
159 switch (err) { 159 switch (err) {
160 case noErr: 160 case noErr:
161 CertDatabase::NotifyObserversOfCertAdded(cert); 161 CertDatabase::NotifyObserversOfCertAdded(cert);
162 // Fall through. 162 FALLTHROUGH_INTENDED;
163 case errSecDuplicateItem: 163 case errSecDuplicateItem:
164 return OK; 164 return OK;
165 default: 165 default:
166 OSSTATUS_LOG(ERROR, err) << "CertDatabase failed to add cert to keychain"; 166 OSSTATUS_LOG(ERROR, err) << "CertDatabase failed to add cert to keychain";
167 // TODO(snej): Map the error code more intelligently. 167 // TODO(snej): Map the error code more intelligently.
168 return ERR_ADD_USER_CERT_FAILED; 168 return ERR_ADD_USER_CERT_FAILED;
169 } 169 }
170 } 170 }
171 171
172 } // namespace net 172 } // namespace net
OLDNEW
« no previous file with comments | « net/base/registry_controlled_domains/registry_controlled_domain.cc ('k') | net/cert/cert_status_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698