diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-28 08:16:04 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-28 08:16:04 +0000 |
commit | 60e60dd3c997d406461f3f56f97937544f2120dd (patch) | |
tree | 7195f67c85c4906cd45701f7eca6f3adab6bead5 /jingle/glue | |
parent | 215605c46baa9cf76d5293bac0fbb9ee0914ae4f (diff) | |
download | chromium_src-60e60dd3c997d406461f3f56f97937544f2120dd.zip chromium_src-60e60dd3c997d406461f3f56f97937544f2120dd.tar.gz chromium_src-60e60dd3c997d406461f3f56f97937544f2120dd.tar.bz2 |
RefCounted types should not have public destructors, sql/ and jingle/ edition
BUG=123295
TEST=none
Review URL: http://codereview.chromium.org/10038045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle/glue')
-rw-r--r-- | jingle/glue/pseudotcp_adapter.cc | 4 | ||||
-rw-r--r-- | jingle/glue/pseudotcp_adapter_unittest.cc | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/jingle/glue/pseudotcp_adapter.cc b/jingle/glue/pseudotcp_adapter.cc index 7458f89..40e99e3 100644 --- a/jingle/glue/pseudotcp_adapter.cc +++ b/jingle/glue/pseudotcp_adapter.cc @@ -26,7 +26,6 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify, public base::RefCounted<Core> { public: Core(net::Socket* socket); - virtual ~Core(); // Functions used to implement net::StreamSocket. int Read(net::IOBuffer* buffer, int buffer_size, @@ -57,6 +56,9 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify, void DeleteSocket(); private: + friend class base::RefCounted<Core>; + virtual ~Core(); + // These are invoked by the underlying Socket, and may trigger callbacks. // They hold a reference to |this| while running, to protect from deletion. void OnRead(int result); diff --git a/jingle/glue/pseudotcp_adapter_unittest.cc b/jingle/glue/pseudotcp_adapter_unittest.cc index 4b4431e..3ff69c7 100644 --- a/jingle/glue/pseudotcp_adapter_unittest.cc +++ b/jingle/glue/pseudotcp_adapter_unittest.cc @@ -181,8 +181,6 @@ class TCPChannelTester : public base::RefCountedThreadSafe<TCPChannelTester> { read_errors_(0) { } - virtual ~TCPChannelTester() { } - void Start() { message_loop_->PostTask( FROM_HERE, base::Bind(&TCPChannelTester::DoStart, this)); @@ -202,6 +200,8 @@ class TCPChannelTester : public base::RefCountedThreadSafe<TCPChannelTester> { } protected: + virtual ~TCPChannelTester() {} + void Done() { done_ = true; message_loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure()); @@ -286,6 +286,8 @@ class TCPChannelTester : public base::RefCountedThreadSafe<TCPChannelTester> { } private: + friend class base::RefCountedThreadSafe<TCPChannelTester>; + MessageLoop* message_loop_; net::Socket* host_socket_; net::Socket* client_socket_; |