Chromium Code Reviews| Index: jingle/glue/pseudotcp_adapter.h |
| diff --git a/jingle/glue/pseudotcp_adapter.h b/jingle/glue/pseudotcp_adapter.h |
| index 35df8ce91aff96bf6bd1ef200d20647379df36da..df731953c4014f2f7e28e714340b86a0c81e8813 100644 |
| --- a/jingle/glue/pseudotcp_adapter.h |
| +++ b/jingle/glue/pseudotcp_adapter.h |
| @@ -17,9 +17,7 @@ |
| namespace jingle_glue { |
| -class PseudoTcpAdapter : public net::StreamSocket, |
| - public cricket::IPseudoTcpNotify, |
| - public base::NonThreadSafe { |
| +class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe { |
|
Sergey Ulanov
2011/05/20 22:01:40
Please add some comments explaining lifetime of th
Wez
2011/05/21 08:10:55
Done.
|
| public: |
| // Creates adapter for the specified |socket|. |socket| is assumed |
| // to be already connected. Takes ownership of |socket|. |
| @@ -47,43 +45,10 @@ class PseudoTcpAdapter : public net::StreamSocket, |
| virtual bool WasEverUsed() const OVERRIDE; |
| virtual bool UsingTCPFastOpen() const OVERRIDE; |
| - // cricket::IPseudoTcpNotify implementation. |
| - virtual void OnTcpOpen(cricket::PseudoTcp* tcp) OVERRIDE; |
| - virtual void OnTcpReadable(cricket::PseudoTcp* tcp) OVERRIDE; |
| - virtual void OnTcpWriteable(cricket::PseudoTcp* tcp) OVERRIDE; |
| - virtual void OnTcpClosed(cricket::PseudoTcp* tcp, uint32 error) OVERRIDE; |
| - virtual WriteResult TcpWritePacket(cricket::PseudoTcp* tcp, |
| - const char* buffer, size_t len) OVERRIDE; |
| - |
| private: |
| - void DoReadFromSocket(); |
| - void HandleReadResults(int result); |
| - |
| - // Callback functions for Read() and Write() in |socket_| |
| - void OnRead(int result); |
| - void OnWritten(int result); |
| - |
| - void AdjustClock(); |
| - void HandleTcpClock(); |
| - |
| - scoped_ptr<net::Socket> socket_; |
| - cricket::PseudoTcp pseudotcp_; |
| - |
| - net::CompletionCallback* connect_callback_; |
| - scoped_refptr<net::IOBuffer> read_buffer_; |
| - int read_buffer_size_; |
| - net::CompletionCallback* read_callback_; |
| - scoped_refptr<net::IOBuffer> write_buffer_; |
| - int write_buffer_size_; |
| - net::CompletionCallback* write_callback_; |
| - |
| - bool socket_write_pending_; |
| - scoped_refptr<net::IOBuffer> socket_read_buffer_; |
| - |
| - net::CompletionCallbackImpl<PseudoTcpAdapter> socket_read_callback_; |
| - net::CompletionCallbackImpl<PseudoTcpAdapter> socket_write_callback_; |
| + class Core; |
| - base::OneShotTimer<PseudoTcpAdapter> timer_; |
| + scoped_refptr<Core> core_; |
| net::BoundNetLog net_log_; |