| Index: base/crypto/scoped_nss_types.h
|
| diff --git a/base/crypto/scoped_nss_types.h b/base/crypto/scoped_nss_types.h
|
| index c1c84c1e42cceb7455896d093e0a44b09703aba5..b5d48df601932b4605c9003b86d7db563ab0ca31 100644
|
| --- a/base/crypto/scoped_nss_types.h
|
| +++ b/base/crypto/scoped_nss_types.h
|
| @@ -12,31 +12,18 @@
|
|
|
| namespace base {
|
|
|
| -template <typename Type, void (*Destroyer)(Type*)>
|
| -struct NSSDestroyer {
|
| - void operator()(Type* ptr) const {
|
| - if (ptr)
|
| - Destroyer(ptr);
|
| - }
|
| -};
|
| -
|
| template <typename Type, void (*Destroyer)(Type*, PRBool), PRBool freeit>
|
| -struct NSSDestroyer1 {
|
| - void operator()(Type* ptr) const {
|
| - if (ptr)
|
| - Destroyer(ptr, freeit);
|
| - }
|
| -};
|
| +void NSSDestroyer1(Type* ptr) {
|
| + Destroyer(ptr, freeit);
|
| +}
|
|
|
| // Define some convenient scopers around NSS pointers.
|
| typedef scoped_ptr_malloc<
|
| PK11Context, NSSDestroyer1<PK11Context,
|
| PK11_DestroyContext,
|
| PR_TRUE> > ScopedPK11Context;
|
| -typedef scoped_ptr_malloc<
|
| - PK11SlotInfo, NSSDestroyer<PK11SlotInfo, PK11_FreeSlot> > ScopedPK11Slot;
|
| -typedef scoped_ptr_malloc<
|
| - PK11SymKey, NSSDestroyer<PK11SymKey, PK11_FreeSymKey> > ScopedPK11SymKey;
|
| +typedef scoped_ptr_malloc<PK11SlotInfo, PK11_FreeSlot> ScopedPK11Slot;
|
| +typedef scoped_ptr_malloc<PK11SymKey, PK11_FreeSymKey> ScopedPK11SymKey;
|
| typedef scoped_ptr_malloc<
|
| SECAlgorithmID, NSSDestroyer1<SECAlgorithmID,
|
| SECOID_DestroyAlgorithmID,
|
|
|