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

Side by Side Diff: chrome/common/net/x509_certificate_model_nss.cc

Issue 169193002: Convert scoped_ptr_malloc -> scoped_ptr, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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 | « base/debug/stack_trace_posix.cc ('k') | content/renderer/pepper/host_var_tracker_unittest.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 "chrome/common/net/x509_certificate_model.h" 5 #include "chrome/common/net/x509_certificate_model.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <cms.h> 8 #include <cms.h>
9 #include <hasht.h> 9 #include <hasht.h>
10 #include <keyhi.h> // SECKEY_DestroyPrivateKey 10 #include <keyhi.h> // SECKEY_DestroyPrivateKey
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 //////////////////////////////////////////////////////////////////////////////// 74 ////////////////////////////////////////////////////////////////////////////////
75 // NSS certificate export functions. 75 // NSS certificate export functions.
76 76
77 struct NSSCMSMessageDeleter { 77 struct NSSCMSMessageDeleter {
78 inline void operator()(NSSCMSMessage* x) const { 78 inline void operator()(NSSCMSMessage* x) const {
79 NSS_CMSMessage_Destroy(x); 79 NSS_CMSMessage_Destroy(x);
80 } 80 }
81 }; 81 };
82 typedef scoped_ptr<NSSCMSMessage, NSSCMSMessageDeleter> ScopedNSSCMSMessage; 82 typedef scoped_ptr<NSSCMSMessage, NSSCMSMessageDeleter> ScopedNSSCMSMessage;
83 83
84 class FreeNSSCMSSignedData { 84 struct FreeNSSCMSSignedData {
85 public:
86 inline void operator()(NSSCMSSignedData* x) const { 85 inline void operator()(NSSCMSSignedData* x) const {
87 NSS_CMSSignedData_Destroy(x); 86 NSS_CMSSignedData_Destroy(x);
88 } 87 }
89 }; 88 };
90 typedef scoped_ptr_malloc<NSSCMSSignedData, FreeNSSCMSSignedData> 89 typedef scoped_ptr<NSSCMSSignedData, FreeNSSCMSSignedData>
91 ScopedNSSCMSSignedData; 90 ScopedNSSCMSSignedData;
92 91
93 } // namespace 92 } // namespace
94 93
95 namespace x509_certificate_model { 94 namespace x509_certificate_model {
96 95
97 using net::X509Certificate; 96 using net::X509Certificate;
98 using std::string; 97 using std::string;
99 98
100 string GetCertNameOrNickname(X509Certificate::OSCertHandle cert_handle) { 99 string GetCertNameOrNickname(X509Certificate::OSCertHandle cert_handle) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 string ProcessRawBitsSignatureWrap(X509Certificate::OSCertHandle cert_handle) { 404 string ProcessRawBitsSignatureWrap(X509Certificate::OSCertHandle cert_handle) {
406 return ProcessRawBits(cert_handle->signatureWrap.signature.data, 405 return ProcessRawBits(cert_handle->signatureWrap.signature.data,
407 cert_handle->signatureWrap.signature.len); 406 cert_handle->signatureWrap.signature.len);
408 } 407 }
409 408
410 void RegisterDynamicOids() { 409 void RegisterDynamicOids() {
411 psm::RegisterDynamicOids(); 410 psm::RegisterDynamicOids();
412 } 411 }
413 412
414 } // namespace x509_certificate_model 413 } // namespace x509_certificate_model
OLDNEW
« no previous file with comments | « base/debug/stack_trace_posix.cc ('k') | content/renderer/pepper/host_var_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698