diff options
Diffstat (limited to 'base/ref_counted.h')
-rw-r--r-- | base/ref_counted.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/ref_counted.h b/base/ref_counted.h index 79f9f55..097d16e 100644 --- a/base/ref_counted.h +++ b/base/ref_counted.h @@ -13,6 +13,9 @@ namespace base { namespace subtle { class RefCountedBase { + public: + bool HasOneRef() const { return ref_count_ == 1; } + protected: RefCountedBase(); ~RefCountedBase(); @@ -34,6 +37,9 @@ class RefCountedBase { }; class RefCountedThreadSafeBase { + public: + bool HasOneRef() const; + protected: RefCountedThreadSafeBase(); ~RefCountedThreadSafeBase(); |