diff options
Diffstat (limited to 'base/ref_counted.h')
-rw-r--r-- | base/ref_counted.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/base/ref_counted.h b/base/ref_counted.h index 0e0ea67..595a551 100644 --- a/base/ref_counted.h +++ b/base/ref_counted.h @@ -109,6 +109,19 @@ class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase { DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe<T>); }; +// +// A wrapper for some piece of data so we can place other things in +// scoped_refptrs<>. +// +template<typename T> +class RefCountedData : public base::RefCounted< base::RefCountedData<T> > { + public: + RefCountedData() : data() {} + RefCountedData(const T& in_value) : data(in_value) {} + + T data; +}; + } // namespace base // @@ -213,4 +226,3 @@ class scoped_refptr { }; #endif // BASE_REF_COUNTED_H_ - |