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

Side by Side Diff: base/memory/scoped_generic_obj.h

Issue 10735044: Remove #pragma once. Just from base/ for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/memory/ref_counted_memory.h ('k') | base/memory/scoped_handle.h » ('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 #ifndef BASE_MEMORY_SCOPED_GENERIC_OBJ_H_ 5 #ifndef BASE_MEMORY_SCOPED_GENERIC_OBJ_H_
6 #define BASE_MEMORY_SCOPED_GENERIC_OBJ_H_ 6 #define BASE_MEMORY_SCOPED_GENERIC_OBJ_H_
7 #pragma once
8 7
9 #include "base/basictypes.h" 8 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
11 10
12 // ScopedGenericObj<> is patterned after scoped_ptr_malloc<>, except 11 // ScopedGenericObj<> is patterned after scoped_ptr_malloc<>, except
13 // that it assumes the template argument is typedef'ed to a pointer 12 // that it assumes the template argument is typedef'ed to a pointer
14 // type. It does not support retain/release semantics. It takes as its 13 // type. It does not support retain/release semantics. It takes as its
15 // second template argument a functor which frees the object. 14 // second template argument a functor which frees the object.
16 // 15 //
17 // Example (Mac-specific): 16 // Example (Mac-specific):
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 bool operator==(C* p, const ScopedGenericObj<C, FP>& b) { 120 bool operator==(C* p, const ScopedGenericObj<C, FP>& b) {
122 return p == b.get(); 121 return p == b.get();
123 } 122 }
124 123
125 template<class C, class FP> inline 124 template<class C, class FP> inline
126 bool operator!=(C* p, const ScopedGenericObj<C, FP>& b) { 125 bool operator!=(C* p, const ScopedGenericObj<C, FP>& b) {
127 return p != b.get(); 126 return p != b.get();
128 } 127 }
129 128
130 #endif // BASE_MEMORY_SCOPED_GENERIC_OBJ_H_ 129 #endif // BASE_MEMORY_SCOPED_GENERIC_OBJ_H_
OLDNEW
« no previous file with comments | « base/memory/ref_counted_memory.h ('k') | base/memory/scoped_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698