Index: remoting/protocol/fake_authenticator.cc |
diff --git a/remoting/protocol/fake_authenticator.cc b/remoting/protocol/fake_authenticator.cc |
index c816cfa09492dd94ea8955d3d5372e62bcbb69cb..d597568b075773d7f908d32f54350b9c1b2f1433 100644 |
--- a/remoting/protocol/fake_authenticator.cc |
+++ b/remoting/protocol/fake_authenticator.cc |
@@ -4,6 +4,7 @@ |
#include "remoting/protocol/fake_authenticator.h" |
+#include "base/callback_helpers.h" |
#include "base/message_loop/message_loop.h" |
#include "base/strings/string_number_conversions.h" |
#include "net/base/io_buffer.h" |
@@ -82,11 +83,9 @@ void FakeChannelAuthenticator::OnAuthBytesRead(int result) { |
} |
void FakeChannelAuthenticator::CallDoneCallback() { |
- DoneCallback callback = done_callback_; |
- done_callback_.Reset(); |
if (result_ != net::OK) |
socket_.reset(); |
- callback.Run(result_, socket_.Pass()); |
+ base::ResetAndReturn(&done_callback_).Run(result_, socket_.Pass()); |
} |
FakeAuthenticator::FakeAuthenticator( |