| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef NET_CERT_SCOPED_NSS_TYPES_H_ | 5 #ifndef NET_CERT_SCOPED_NSS_TYPES_H_ |
| 6 #define NET_CERT_SCOPED_NSS_TYPES_H_ | 6 #define NET_CERT_SCOPED_NSS_TYPES_H_ |
| 7 | 7 |
| 8 #include <cert.h> | 8 #include <cert.h> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 struct FreeCERTCertificate { | 14 struct FreeCERTCertificate { |
| 15 public: | |
| 16 void operator()(CERTCertificate* x) const { | 15 void operator()(CERTCertificate* x) const { |
| 17 CERT_DestroyCertificate(x); | 16 CERT_DestroyCertificate(x); |
| 18 } | 17 } |
| 19 }; | 18 }; |
| 20 | 19 |
| 21 typedef scoped_ptr_malloc<CERTCertificate, FreeCERTCertificate> | 20 typedef scoped_ptr<CERTCertificate, FreeCERTCertificate> ScopedCERTCertificate; |
| 22 ScopedCERTCertificate; | |
| 23 | 21 |
| 24 } // namespace net | 22 } // namespace net |
| 25 | 23 |
| 26 #endif // NET_CERT_SCOPED_NSS_TYPES_H_ | 24 #endif // NET_CERT_SCOPED_NSS_TYPES_H_ |
| OLD | NEW |