diff options
author | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 00:48:15 +0000 |
---|---|---|
committer | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 00:48:15 +0000 |
commit | 4b4172299b3b74557ba20d3d8c87d811cf502f39 (patch) | |
tree | 99448b8838e18fefe7ab4b247d381c078a5bc83d /base/ref_counted.h | |
parent | 827ea2449764f84344a5e1d5c3b650f29cf2571f (diff) | |
download | chromium_src-4b4172299b3b74557ba20d3d8c87d811cf502f39.zip chromium_src-4b4172299b3b74557ba20d3d8c87d811cf502f39.tar.gz chromium_src-4b4172299b3b74557ba20d3d8c87d811cf502f39.tar.bz2 |
Revert "Const-ify RefCountedThreadSafe::AddRef and Release."
This reverts commit b7ce919957536ceb0cfac1709bc779fd086b6ce8.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/ref_counted.h')
-rw-r--r-- | base/ref_counted.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/base/ref_counted.h b/base/ref_counted.h index 9c84efa..2cc4029 100644 --- a/base/ref_counted.h +++ b/base/ref_counted.h @@ -106,7 +106,7 @@ template <class T, typename Traits> class RefCountedThreadSafe; // count reaches 0. Overload to delete it on a different thread etc. template<typename T> struct DefaultRefCountedThreadSafeTraits { - static void Destruct(const T* x) { + static void Destruct(T* x) { // Delete through RefCountedThreadSafe to make child classes only need to be // friend with RefCountedThreadSafe instead of this struct, which is an // implementation detail. @@ -133,19 +133,19 @@ class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase { RefCountedThreadSafe() { } ~RefCountedThreadSafe() { } - void AddRef() const { + void AddRef() { subtle::RefCountedThreadSafeBase::AddRef(); } - void Release() const { + void Release() { if (subtle::RefCountedThreadSafeBase::Release()) { - Traits::Destruct(static_cast<const T*>(this)); + Traits::Destruct(static_cast<T*>(this)); } } private: friend struct DefaultRefCountedThreadSafeTraits<T>; - static void DeleteInternal(const T* x) { delete x; } + static void DeleteInternal(T* x) { delete x; } DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe); }; |