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

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

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/x509_certificate.h" 5 #include "net/base/x509_certificate.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <Security/Security.h> 8 #include <Security/Security.h>
9 #include <time.h> 9 #include <time.h>
10 10
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 // CSSM_APPLE_TP_NAME_OIDs. 537 // CSSM_APPLE_TP_NAME_OIDs.
538 std::vector<CSSM_APPLE_TP_NAME_OID> cssm_subject_names; 538 std::vector<CSSM_APPLE_TP_NAME_OID> cssm_subject_names;
539 for(CSSMOIDStringVector::iterator iter = subject_name_oids.begin(); 539 for(CSSMOIDStringVector::iterator iter = subject_name_oids.begin();
540 iter != subject_name_oids.end(); ++iter) { 540 iter != subject_name_oids.end(); ++iter) {
541 CSSM_APPLE_TP_NAME_OID cssm_subject_name; 541 CSSM_APPLE_TP_NAME_OID cssm_subject_name;
542 cssm_subject_name.oid = iter->oid_; 542 cssm_subject_name.oid = iter->oid_;
543 cssm_subject_name.string = iter->string_.c_str(); 543 cssm_subject_name.string = iter->string_.c_str();
544 cssm_subject_names.push_back(cssm_subject_name); 544 cssm_subject_names.push_back(cssm_subject_name);
545 } 545 }
546 546
547 if (cssm_subject_names.size() == 0) { 547 if (cssm_subject_names.empty()) {
548 DLOG(ERROR) << "cssm_subject_names.size() == 0. Input: " << subject; 548 DLOG(ERROR) << "cssm_subject_names.size() == 0. Input: " << subject;
549 return NULL; 549 return NULL;
550 } 550 }
551 551
552 // Set up a certificate request. 552 // Set up a certificate request.
553 CSSM_APPLE_TP_CERT_REQUEST certReq; 553 CSSM_APPLE_TP_CERT_REQUEST certReq;
554 memset(&certReq, 0, sizeof(certReq)); 554 memset(&certReq, 0, sizeof(certReq));
555 certReq.cspHand = base::GetSharedCSPHandle(); 555 certReq.cspHand = base::GetSharedCSPHandle();
556 certReq.clHand = base::GetSharedCLHandle(); 556 certReq.clHand = base::GetSharedCLHandle();
557 // See comment about serial numbers above. 557 // See comment about serial numbers above.
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 CFArrayAppendArray(chain, 1176 CFArrayAppendArray(chain,
1177 cert_chain, 1177 cert_chain,
1178 CFRangeMake(1, chain_count - 1)); 1178 CFRangeMake(1, chain_count - 1));
1179 } 1179 }
1180 } 1180 }
1181 1181
1182 return chain.release(); 1182 return chain.release();
1183 } 1183 }
1184 1184
1185 } // namespace net 1185 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698