summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/v1_host_channel_authenticator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/protocol/v1_host_channel_authenticator.cc')
-rw-r--r--remoting/protocol/v1_host_channel_authenticator.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/remoting/protocol/v1_host_channel_authenticator.cc b/remoting/protocol/v1_host_channel_authenticator.cc
index c124d47..c27340b 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))