Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1199)

Unified Diff: chrome/browser/extensions/api/socket/tcp_socket.h

Issue 76403004: An implementation of chrome.socket.secure(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing another cross-platform build issue (try 2) Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..58cea57028a3706a8216fc25df45f9b3c40a10db 100644
--- a/chrome/browser/extensions/api/socket/tcp_socket.h
+++ b/chrome/browser/extensions/api/socket/tcp_socket.h
@@ -53,6 +53,11 @@ class TCPSocket : public Socket {
virtual bool GetPeerAddress(net::IPEndPoint* address) OVERRIDE;
virtual bool GetLocalAddress(net::IPEndPoint* address) OVERRIDE;
+
+ // Like Disconnect(), only it doesn't delete the underlying stream or
+ // attempt to close it. Useful for when someone else takes it over.
Ryan Sleevi 2013/11/25 17:30:13 comment nit re: pronouns
Lally Singh 2013/12/05 17:07:12 Done.
+ virtual void Release();
+
virtual Socket::SocketType GetSocketType() const OVERRIDE;
static TCPSocket* CreateSocketForTesting(
@@ -63,6 +68,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,

Powered by Google App Engine
This is Rietveld 408576698