Chromium Code Reviews| Index: jingle/glue/pseudotcp_adapter.h |
| diff --git a/jingle/glue/pseudotcp_adapter.h b/jingle/glue/pseudotcp_adapter.h |
| index 91811e93c6351a8d4bde6199893f1f3d67bccd40..fd7781f0e3e05ade9bfa3902cb00b103c34d59d2 100644 |
| --- a/jingle/glue/pseudotcp_adapter.h |
| +++ b/jingle/glue/pseudotcp_adapter.h |
| @@ -29,6 +29,11 @@ class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe { |
| PseudoTcpAdapter(net::Socket* socket); |
| virtual ~PseudoTcpAdapter(); |
| + // Sets callback that should be called when the adapter is being |
| + // destroyed. The callback is not allowed to touch the adapter, but |
| + // can do anything else, e.g. destroy the TransportChannel. |
| + void SetOnDestroyedCallback(const base::Closure& callback); |
|
Wez
2012/02/22 22:51:38
We only need this because the Transport implementa
Sergey Ulanov
2012/02/22 23:36:32
No. The problem is that PseudoTcpAdapter::Core may
Wez
2012/02/23 19:33:42
Ouch! I wonder if we could tear down the underlyi
Sergey Ulanov
2012/02/23 22:10:06
Agree, that's a better approach. Done.
|
| + |
| // net::Socket implementation. |
| virtual int Read(net::IOBuffer* buffer, int buffer_size, |
| const net::CompletionCallback& callback) OVERRIDE; |
| @@ -61,6 +66,8 @@ class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe { |
| private: |
| class Core; |
| + base::Closure destruction_callback_; |
| + |
| scoped_refptr<Core> core_; |
| net::BoundNetLog net_log_; |