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

Side by Side Diff: base/test/opaque_ref_counted.h

Issue 2471043002: Allow icomplete types in scoped_refptr<T>. (Closed)
Patch Set: Release can delete this Created 4 years, 1 month 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
« no previous file with comments | « base/memory/ref_counted.h ('k') | base/test/opaque_ref_counted.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TEST_OPAQUE_REF_COUNTED_H_ 5 #ifndef BASE_TEST_OPAQUE_REF_COUNTED_H_
6 #define BASE_TEST_OPAQUE_REF_COUNTED_H_ 6 #define BASE_TEST_OPAQUE_REF_COUNTED_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 9
10 namespace base { 10 namespace base {
11 11
12 // OpaqueRefCounted is a test class for scoped_refptr to ensure it still works 12 // OpaqueRefCounted is a test class for scoped_refptr to ensure it still works
13 // when the pointed-to type is opaque (i.e., incomplete). 13 // when the pointed-to type is opaque (i.e., incomplete).
14 class OpaqueRefCounted; 14 class OpaqueRefCounted;
15 class OpaqueRefCountedThreadSafe; 15 class OpaqueRefCountedThreadSafe;
16 16
17 // Test functions that return and accept scoped_refptr<OpaqueRefCounted> values. 17 // Test functions that return and accept scoped_refptr<OpaqueRefCounted> values.
18 scoped_refptr<OpaqueRefCounted> MakeOpaqueRefCounted(); 18 scoped_refptr<OpaqueRefCounted> MakeOpaqueRefCounted();
19 void TestOpaqueRefCounted(scoped_refptr<OpaqueRefCounted> p); 19 void TestOpaqueRefCounted(scoped_refptr<OpaqueRefCounted> p);
20 scoped_refptr<OpaqueRefCountedThreadSafe> MakeOpaqueRefCountedThreadSafe(); 20 scoped_refptr<OpaqueRefCountedThreadSafe> MakeOpaqueRefCountedThreadSafe();
21 void TestOpaqueRefCountedThreadSafe( 21 void TestOpaqueRefCountedThreadSafe(
22 scoped_refptr<OpaqueRefCountedThreadSafe> p); 22 scoped_refptr<OpaqueRefCountedThreadSafe> p);
23 23
24 } // namespace base 24 } // namespace base
25 25
26 extern template class scoped_refptr<base::OpaqueRefCounted>;
27 extern template class scoped_refptr<base::OpaqueRefCountedThreadSafe>;
28
29 #endif // BASE_TEST_OPAQUE_REF_COUNTED_H_ 26 #endif // BASE_TEST_OPAQUE_REF_COUNTED_H_
OLDNEW
« no previous file with comments | « base/memory/ref_counted.h ('k') | base/test/opaque_ref_counted.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698