| Index: chrome/browser/extensions/api/socket/tcp_socket.h
|
| diff --git a/chrome/browser/extensions/api/socket/tcp_socket.h b/chrome/browser/extensions/api/socket/tcp_socket.h
|
| index 6cda66c0add58a71b28dae0336dee840f3addc8b..8b51eaf996c4379999e880cce2f7521f34a277a2 100644
|
| --- a/chrome/browser/extensions/api/socket/tcp_socket.h
|
| +++ b/chrome/browser/extensions/api/socket/tcp_socket.h
|
| @@ -53,6 +53,12 @@ class TCPSocket : public Socket {
|
|
|
| virtual bool GetPeerAddress(net::IPEndPoint* address) OVERRIDE;
|
| virtual bool GetLocalAddress(net::IPEndPoint* address) OVERRIDE;
|
| +
|
| + // Like Disconnect(), only Release() doesn't delete the underlying stream
|
| + // or attempt to close it. Useful for giving away ownership of
|
| + // ClientStream().
|
| + virtual void Release();
|
| +
|
| virtual Socket::SocketType GetSocketType() const OVERRIDE;
|
|
|
| static TCPSocket* CreateSocketForTesting(
|
| @@ -63,6 +69,10 @@ class TCPSocket : public Socket {
|
| net::TCPServerSocket* tcp_server_socket,
|
| const std::string& owner_extension_id);
|
|
|
| + // Returns NULL if GetSocketType isn't TYPE_TCP or if the connection wasn't
|
| + // set up via Connect (vs Listen/Accept).
|
| + net::TCPClientSocket* ClientStream();
|
| +
|
| protected:
|
| virtual int WriteImpl(net::IOBuffer* io_buffer,
|
| int io_buffer_size,
|
|
|