diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 01:56:19 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 01:56:19 +0000 |
commit | e6e6ba4925feed48fbbd0568b07d8ccb6569eeee (patch) | |
tree | fc2fc1bc4d4a56fb413709a977b6ba42ab27af46 /chrome/test/chrome_plugin | |
parent | daefca3e87d6d36f0e6a58e3b0ff60917f285acb (diff) | |
download | chromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.zip chromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.tar.gz chromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.tar.bz2 |
Ninth patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/372013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chrome_plugin')
-rw-r--r-- | chrome/test/chrome_plugin/test_chrome_plugin.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/test/chrome_plugin/test_chrome_plugin.cc b/chrome/test/chrome_plugin/test_chrome_plugin.cc index 9e6d0e0..468ee0c 100644 --- a/chrome/test/chrome_plugin/test_chrome_plugin.cc +++ b/chrome/test/chrome_plugin/test_chrome_plugin.cc @@ -48,15 +48,18 @@ void STDCALL InvokeLaterCallback(void* data) { class ResponseStream : public base::RefCounted<ResponseStream> { public: ResponseStream(const TestResponsePayload* payload, CPRequest* request); - ~ResponseStream() { - request_->pdata = NULL; - } void Init(); int GetResponseInfo(CPResponseInfoType type, void* buf, uint32 buf_size); int ReadData(void* buf, uint32 buf_size); -private: + private: + friend class base::RefCounted<ResponseStream>; + + ~ResponseStream() { + request_->pdata = NULL; + } + // Called asynchronously via InvokeLater. void ResponseStarted(); int ReadCompleted(void* buf, uint32 buf_size); |