diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 23:40:45 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 23:40:45 +0000 |
commit | 122331d5cf1fdad245bb4e174c188ec3851b4d13 (patch) | |
tree | d9d47ff2304f96e0f5bbe97e080c80069ad45c9a /webkit/appcache/appcache_storage.h | |
parent | f164cea41472f9e9ec21579233e2c42a7b9d5184 (diff) | |
download | chromium_src-122331d5cf1fdad245bb4e174c188ec3851b4d13.zip chromium_src-122331d5cf1fdad245bb4e174c188ec3851b4d13.tar.gz chromium_src-122331d5cf1fdad245bb4e174c188ec3851b4d13.tar.bz2 |
Third patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/363023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_storage.h')
-rw-r--r-- | webkit/appcache/appcache_storage.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h index c221054..608ea34 100644 --- a/webkit/appcache/appcache_storage.h +++ b/webkit/appcache/appcache_storage.h @@ -177,16 +177,19 @@ class AppCacheStorage { DelegateReferenceMap::value_type(delegate, this)); } - ~DelegateReference() { - if (delegate) - storage->delegate_references_.erase(delegate); - } - void CancelReference() { storage->delegate_references_.erase(delegate); storage = NULL; delegate = NULL; } + + private: + friend class base::RefCounted<DelegateReference>; + + ~DelegateReference() { + if (delegate) + storage->delegate_references_.erase(delegate); + } }; typedef std::map<Delegate*, DelegateReference*> DelegateReferenceMap; typedef std::vector<scoped_refptr<DelegateReference> > |