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

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

Issue 18346006: Update OS X to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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
« no previous file with comments | « net/cert/cert_verify_proc_unittest.cc ('k') | sync/tools/sync_client.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/x509_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 *left = src.substr(0, pos); 214 *left = src.substr(0, pos);
215 *right = src.substr(pos); 215 *right = src.substr(pos);
216 } 216 }
217 } 217 }
218 218
219 } // namespace 219 } // namespace
220 220
221 bool X509Certificate::LessThan::operator()( 221 bool X509Certificate::LessThan::operator()(
222 const scoped_refptr<X509Certificate>& lhs, 222 const scoped_refptr<X509Certificate>& lhs,
223 const scoped_refptr<X509Certificate>& rhs) const { 223 const scoped_refptr<X509Certificate>& rhs) const {
224 if (lhs == rhs) 224 if (lhs.get() == rhs.get())
225 return false; 225 return false;
226 226
227 int rv = memcmp(lhs->fingerprint_.data, rhs->fingerprint_.data, 227 int rv = memcmp(lhs->fingerprint_.data, rhs->fingerprint_.data,
228 sizeof(lhs->fingerprint_.data)); 228 sizeof(lhs->fingerprint_.data));
229 if (rv != 0) 229 if (rv != 0)
230 return rv < 0; 230 return rv < 0;
231 231
232 rv = memcmp(lhs->ca_fingerprint_.data, rhs->ca_fingerprint_.data, 232 rv = memcmp(lhs->ca_fingerprint_.data, rhs->ca_fingerprint_.data,
233 sizeof(lhs->ca_fingerprint_.data)); 233 sizeof(lhs->ca_fingerprint_.data));
234 return rv < 0; 234 return rv < 0;
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 RemoveFromCache(cert_handle_); 717 RemoveFromCache(cert_handle_);
718 FreeOSCertHandle(cert_handle_); 718 FreeOSCertHandle(cert_handle_);
719 } 719 }
720 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) { 720 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) {
721 RemoveFromCache(intermediate_ca_certs_[i]); 721 RemoveFromCache(intermediate_ca_certs_[i]);
722 FreeOSCertHandle(intermediate_ca_certs_[i]); 722 FreeOSCertHandle(intermediate_ca_certs_[i]);
723 } 723 }
724 } 724 }
725 725
726 } // namespace net 726 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_unittest.cc ('k') | sync/tools/sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698