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

Unified Diff: remoting/protocol/jingle_stream_connector.cc

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 | « remoting/protocol/jingle_stream_connector.h ('k') | remoting/protocol/message_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_stream_connector.cc
diff --git a/remoting/protocol/jingle_stream_connector.cc b/remoting/protocol/jingle_stream_connector.cc
index 4eab85e2379a2586c54e58bb8fd7bc54e3d03dd8..d7ce7faddaf05873677d17a9a3cd5b866211678d 100644
--- a/remoting/protocol/jingle_stream_connector.cc
+++ b/remoting/protocol/jingle_stream_connector.cc
@@ -41,9 +41,7 @@ JingleStreamConnector::JingleStreamConnector(
: session_(session),
name_(name),
callback_(callback),
- raw_channel_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(tcp_connect_callback_(
- this, &JingleStreamConnector::OnTCPConnect)) {
+ raw_channel_(NULL) {
}
JingleStreamConnector::~JingleStreamConnector() {
@@ -83,11 +81,13 @@ bool JingleStreamConnector::EstablishTCPConnection(net::Socket* socket) {
adapter->SetSendBufferSize(kTcpSendBufferSize);
tcp_socket_.reset(adapter);
- int result = tcp_socket_->Connect(&tcp_connect_callback_);
+ int result = tcp_socket_->Connect(
+ base::Bind(&JingleStreamConnector::OnTCPConnect,
+ base::Unretained(this)));
if (result == net::ERR_IO_PENDING) {
return true;
} else if (result == net::OK) {
- tcp_connect_callback_.Run(result);
+ OnTCPConnect(result);
return true;
}
« no previous file with comments | « remoting/protocol/jingle_stream_connector.h ('k') | remoting/protocol/message_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698