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

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

Issue 9447084: Refactor Pickle Read methods to use higher performance PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile (racing with incoming CLs) Created 8 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
« no previous file with comments | « net/base/x509_certificate.cc ('k') | net/base/x509_certificate_nss.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/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 <CoreServices/CoreServices.h> 8 #include <CoreServices/CoreServices.h>
9 #include <Security/Security.h> 9 #include <Security/Security.h>
10 #include <time.h> 10 #include <time.h>
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 CFArrayAppendValue(cert_list, os_cert_handle()); 1558 CFArrayAppendValue(cert_list, os_cert_handle());
1559 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) 1559 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i)
1560 CFArrayAppendValue(cert_list, intermediate_ca_certs_[i]); 1560 CFArrayAppendValue(cert_list, intermediate_ca_certs_[i]);
1561 1561
1562 return cert_list; 1562 return cert_list;
1563 } 1563 }
1564 1564
1565 // static 1565 // static
1566 X509Certificate::OSCertHandle 1566 X509Certificate::OSCertHandle
1567 X509Certificate::ReadOSCertHandleFromPickle(const Pickle& pickle, 1567 X509Certificate::ReadOSCertHandleFromPickle(const Pickle& pickle,
1568 void** pickle_iter) { 1568 PickleIterator* pickle_iter) {
1569 const char* data; 1569 const char* data;
1570 int length; 1570 int length;
1571 if (!pickle.ReadData(pickle_iter, &data, &length)) 1571 if (!pickle.ReadData(pickle_iter, &data, &length))
1572 return NULL; 1572 return NULL;
1573 1573
1574 return CreateOSCertHandleFromBytes(data, length); 1574 return CreateOSCertHandleFromBytes(data, length);
1575 } 1575 }
1576 1576
1577 // static 1577 // static
1578 bool X509Certificate::WriteOSCertHandleToPickle(OSCertHandle cert_handle, 1578 bool X509Certificate::WriteOSCertHandleToPickle(OSCertHandle cert_handle,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 *type = kPublicKeyTypeDH; 1625 *type = kPublicKeyTypeDH;
1626 break; 1626 break;
1627 default: 1627 default:
1628 *type = kPublicKeyTypeUnknown; 1628 *type = kPublicKeyTypeUnknown;
1629 *size_bits = 0; 1629 *size_bits = 0;
1630 break; 1630 break;
1631 } 1631 }
1632 } 1632 }
1633 1633
1634 } // namespace net 1634 } // namespace net
OLDNEW
« no previous file with comments | « net/base/x509_certificate.cc ('k') | net/base/x509_certificate_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698