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
3// found in the LICENSE file.
4
5#ifndef BASE_TEST_OPAQUE_REF_COUNTED_H_
6#define BASE_TEST_OPAQUE_REF_COUNTED_H_
7
8#include "base/memory/ref_counted.h"
9
10namespace base {
11
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).
14class OpaqueRefCounted;
15class OpaqueRefCountedThreadSafe;
16
17// Test functions that return and accept scoped_refptr<OpaqueRefCounted> values.
18scoped_refptr<OpaqueRefCounted> MakeOpaqueRefCounted();
19void TestOpaqueRefCounted(scoped_refptr<OpaqueRefCounted> p);
20scoped_refptr<OpaqueRefCountedThreadSafe> MakeOpaqueRefCountedThreadSafe();
21void TestOpaqueRefCountedThreadSafe(
22    scoped_refptr<OpaqueRefCountedThreadSafe> p);
23
24}  // namespace base
25
26extern template class scoped_refptr<base::OpaqueRefCounted>;
27extern template class scoped_refptr<base::OpaqueRefCountedThreadSafe>;
28
29#endif  // BASE_TEST_OPAQUE_REF_COUNTED_H_
30