| Index: remoting/protocol/ssl_hmac_channel_authenticator.cc
|
| diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.cc b/remoting/protocol/ssl_hmac_channel_authenticator.cc
|
| index e01998dbc172783905d34f5f4f3cd41891feba65..a8c093e4a24779864c45ea89303f14cd91655267 100644
|
| --- a/remoting/protocol/ssl_hmac_channel_authenticator.cc
|
| +++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/bind_helpers.h"
|
| +#include "base/callback_helpers.h"
|
| #include "crypto/secure_util.h"
|
| #include "net/base/host_port_pair.h"
|
| #include "net/base/io_buffer.h"
|
| @@ -280,20 +281,12 @@ void SslHmacChannelAuthenticator::CheckDone(bool* callback_called) {
|
| if (callback_called)
|
| *callback_called = true;
|
|
|
| - CallDoneCallback(net::OK, socket_.Pass());
|
| + base::ResetAndReturn(&done_callback_).Run(net::OK, socket_.Pass());
|
| }
|
| }
|
|
|
| void SslHmacChannelAuthenticator::NotifyError(int error) {
|
| - CallDoneCallback(error, nullptr);
|
| -}
|
| -
|
| -void SslHmacChannelAuthenticator::CallDoneCallback(
|
| - int error,
|
| - scoped_ptr<net::StreamSocket> socket) {
|
| - DoneCallback callback = done_callback_;
|
| - done_callback_.Reset();
|
| - callback.Run(error, socket.Pass());
|
| + base::ResetAndReturn(&done_callback_).Run(error, nullptr);
|
| }
|
|
|
| } // namespace protocol
|
|
|