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

Unified Diff: remoting/protocol/v1_host_channel_authenticator.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/v1_host_channel_authenticator.h ('k') | webkit/plugins/ppapi/ppb_transport_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/v1_host_channel_authenticator.cc
diff --git a/remoting/protocol/v1_host_channel_authenticator.cc b/remoting/protocol/v1_host_channel_authenticator.cc
index c124d47a53e6c4e23ae9692caa9b2454a42b1996..c27340b02d6b5a078dd9b3910b15259fe913738a 100644
--- a/remoting/protocol/v1_host_channel_authenticator.cc
+++ b/remoting/protocol/v1_host_channel_authenticator.cc
@@ -25,9 +25,7 @@ V1HostChannelAuthenticator::V1HostChannelAuthenticator(
shared_secret_(shared_secret),
socket_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(connect_callback_(
- this, &V1HostChannelAuthenticator::OnConnected)),
- ALLOW_THIS_IN_INITIALIZER_LIST(auth_read_callback_(
- this, &V1HostChannelAuthenticator::OnAuthBytesRead)) {
+ this, &V1HostChannelAuthenticator::OnConnected)) {
}
V1HostChannelAuthenticator::~V1HostChannelAuthenticator() {
@@ -74,9 +72,11 @@ void V1HostChannelAuthenticator::OnConnected(int result) {
void V1HostChannelAuthenticator::DoAuthRead(){
while (true) {
- int result = socket_->Read(auth_read_buf_,
- auth_read_buf_->RemainingCapacity(),
- &auth_read_callback_);
+ int result = socket_->Read(
+ auth_read_buf_,
+ auth_read_buf_->RemainingCapacity(),
+ base::Bind(&V1HostChannelAuthenticator::OnAuthBytesRead,
+ base::Unretained(this)));
if (result == net::ERR_IO_PENDING)
break;
if (!HandleAuthBytesRead(result))
« no previous file with comments | « remoting/protocol/v1_host_channel_authenticator.h ('k') | webkit/plugins/ppapi/ppb_transport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698