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

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

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/test/opaque_ref_counted.h ('k') | base/win/scoped_comptr.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 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 #include "base/test/opaque_ref_counted.h" 5 #include "base/test/opaque_ref_counted.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 scoped_refptr<OpaqueRefCountedThreadSafe> MakeOpaqueRefCountedThreadSafe() { 47 scoped_refptr<OpaqueRefCountedThreadSafe> MakeOpaqueRefCountedThreadSafe() {
48 return new OpaqueRefCountedThreadSafe(); 48 return new OpaqueRefCountedThreadSafe();
49 } 49 }
50 50
51 void TestOpaqueRefCountedThreadSafe( 51 void TestOpaqueRefCountedThreadSafe(
52 scoped_refptr<OpaqueRefCountedThreadSafe> p) { 52 scoped_refptr<OpaqueRefCountedThreadSafe> p) {
53 EXPECT_EQ(42, p->Return42()); 53 EXPECT_EQ(42, p->Return42());
54 } 54 }
55 55
56 } // namespace base 56 } // namespace base
57
58 template class scoped_refptr<base::OpaqueRefCounted>;
59 template class scoped_refptr<base::OpaqueRefCountedThreadSafe>;
OLDNEW
« no previous file with comments | « base/test/opaque_ref_counted.h ('k') | base/win/scoped_comptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698