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

Unified Diff: net/socket/socks5_client_socket.cc

Issue 8831001: base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix alignment. Created 9 years 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.h ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks5_client_socket.cc
diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc
index ea5fc7aaf4a9be740379e0c9ac9e69e57e322b40..3497e24adcba94df21aebc747f4fc210329ce4d2 100644
--- a/net/socket/socks5_client_socket.cc
+++ b/net/socket/socks5_client_socket.cc
@@ -204,10 +204,18 @@ int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len,
// Write is called by the transport layer. This can only be done if the
// SOCKS handshake is complete.
int SOCKS5ClientSocket::Write(IOBuffer* buf, int buf_len,
- OldCompletionCallback* callback) {
+ OldCompletionCallback* callback) {
DCHECK(completed_handshake_);
DCHECK_EQ(STATE_NONE, next_state_);
- DCHECK(!old_user_callback_);
+ DCHECK(!old_user_callback_ && user_callback_.is_null());
+
+ return transport_->socket()->Write(buf, buf_len, callback);
+}
+int SOCKS5ClientSocket::Write(IOBuffer* buf, int buf_len,
+ const CompletionCallback& callback) {
+ DCHECK(completed_handshake_);
+ DCHECK_EQ(STATE_NONE, next_state_);
+ DCHECK(!old_user_callback_ && user_callback_.is_null());
return transport_->socket()->Write(buf, buf_len, callback);
}
« no previous file with comments | « net/socket/socks5_client_socket.h ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698