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

Unified Diff: net/socket/socks_client_socket.h

Issue 169643006: Use sockets with unread data if they've never been used before. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mmenke comments Created 6 years, 9 months 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
« no previous file with comments | « net/socket/socks5_client_socket.cc ('k') | net/socket/socks_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks_client_socket.h
diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h
index d4f058a62b1a2af831a072b5cfed7e00b8a3614d..be05ce0fad0804a5a2930c4ecb1c3a879f6edf61 100644
--- a/net/socket/socks_client_socket.h
+++ b/net/socket/socks_client_socket.h
@@ -84,6 +84,7 @@ class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
void DoCallback(int result);
void OnIOComplete(int result);
+ void OnReadWriteComplete(const CompletionCallback& callback, int result);
int DoLoop(int last_io_result);
int DoResolveHost();
@@ -100,7 +101,7 @@ class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
State next_state_;
- // Stores the callback to the layer above, called on completing Connect().
+ // Stores the callbacks to the layer above, called on completing Connect().
CompletionCallback user_callback_;
// This IOBuffer is used by the class to read and write
@@ -120,6 +121,9 @@ class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
size_t bytes_sent_;
size_t bytes_received_;
+ // This becomes true when the socket is used to send or receive data.
+ bool was_ever_used_;
+
// Used to resolve the hostname to which the SOCKS proxy will connect.
SingleRequestHostResolver host_resolver_;
AddressList addresses_;
« no previous file with comments | « net/socket/socks5_client_socket.cc ('k') | net/socket/socks_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698