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

Side by Side Diff: base/crypto/scoped_nss_types.h

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 BASE_SCOPED_NSS_TYPES_H_ 5 #ifndef BASE_SCOPED_NSS_TYPES_H_
6 #define BASE_SCOPED_NSS_TYPES_H_ 6 #define BASE_SCOPED_NSS_TYPES_H_
7 #pragma once 7 #pragma once
8 8
9 #include <nss.h> 9 #include <nss.h>
10 #include <pk11pub.h> 10 #include <pk11pub.h>
11 11
12 #include "base/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace base { 14 namespace base {
15 15
16 template <typename Type, void (*Destroyer)(Type*)> 16 template <typename Type, void (*Destroyer)(Type*)>
17 struct NSSDestroyer { 17 struct NSSDestroyer {
18 void operator()(Type* ptr) const { 18 void operator()(Type* ptr) const {
19 if (ptr) 19 if (ptr)
20 Destroyer(ptr); 20 Destroyer(ptr);
21 } 21 }
22 }; 22 };
(...skipping 20 matching lines...) Expand all
43 SECOID_DestroyAlgorithmID, 43 SECOID_DestroyAlgorithmID,
44 PR_TRUE> > ScopedSECAlgorithmID; 44 PR_TRUE> > ScopedSECAlgorithmID;
45 typedef scoped_ptr_malloc< 45 typedef scoped_ptr_malloc<
46 SECItem, NSSDestroyer1<SECItem, 46 SECItem, NSSDestroyer1<SECItem,
47 SECITEM_FreeItem, 47 SECITEM_FreeItem,
48 PR_TRUE> > ScopedSECItem; 48 PR_TRUE> > ScopedSECItem;
49 49
50 } // namespace base 50 } // namespace base
51 51
52 #endif // BASE_SCOPED_NSS_TYPES_H_ 52 #endif // BASE_SCOPED_NSS_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698