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

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

Issue 17948002: Update Linux 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, 6 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/x509_certificate.h ('k') | net/disk_cache/block_files.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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 *left = src; 211 *left = src;
212 right->clear(); 212 right->clear();
213 } else { 213 } else {
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()(X509Certificate* lhs, 221 bool X509Certificate::LessThan::operator()(
222 X509Certificate* rhs) const { 222 const scoped_refptr<X509Certificate>& lhs,
223 const scoped_refptr<X509Certificate>& rhs) const {
223 if (lhs == rhs) 224 if (lhs == rhs)
224 return false; 225 return false;
225 226
226 int rv = memcmp(lhs->fingerprint_.data, rhs->fingerprint_.data, 227 int rv = memcmp(lhs->fingerprint_.data, rhs->fingerprint_.data,
227 sizeof(lhs->fingerprint_.data)); 228 sizeof(lhs->fingerprint_.data));
228 if (rv != 0) 229 if (rv != 0)
229 return rv < 0; 230 return rv < 0;
230 231
231 rv = memcmp(lhs->ca_fingerprint_.data, rhs->ca_fingerprint_.data, 232 rv = memcmp(lhs->ca_fingerprint_.data, rhs->ca_fingerprint_.data,
232 sizeof(lhs->ca_fingerprint_.data)); 233 sizeof(lhs->ca_fingerprint_.data));
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 RemoveFromCache(cert_handle_); 717 RemoveFromCache(cert_handle_);
717 FreeOSCertHandle(cert_handle_); 718 FreeOSCertHandle(cert_handle_);
718 } 719 }
719 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) { 720 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) {
720 RemoveFromCache(intermediate_ca_certs_[i]); 721 RemoveFromCache(intermediate_ca_certs_[i]);
721 FreeOSCertHandle(intermediate_ca_certs_[i]); 722 FreeOSCertHandle(intermediate_ca_certs_[i]);
722 } 723 }
723 } 724 }
724 725
725 } // namespace net 726 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate.h ('k') | net/disk_cache/block_files.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698