summaryrefslogtreecommitdiffstats
path: root/chrome/test/chrome_plugin/test_chrome_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/chrome_plugin/test_chrome_plugin.cc')
-rw-r--r--chrome/test/chrome_plugin/test_chrome_plugin.cc11
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);