| Index: remoting/test/app_remoting_connection_helper.cc
|
| diff --git a/remoting/test/app_remoting_connection_helper.cc b/remoting/test/app_remoting_connection_helper.cc
|
| index 14bbde2341eae335656d87c44ac4272ae7a4dd31..83b92caa7cc19a90bd0d7c3a22673393392c4f04 100644
|
| --- a/remoting/test/app_remoting_connection_helper.cc
|
| +++ b/remoting/test/app_remoting_connection_helper.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "remoting/test/app_remoting_connection_helper.h"
|
|
|
| +#include "base/callback_helpers.h"
|
| #include "base/json/json_reader.h"
|
| #include "base/logging.h"
|
| #include "base/run_loop.h"
|
| @@ -53,10 +54,6 @@ void AppRemotingConnectionHelper::SetHostMessageReceivedCallback(
|
| host_message_received_callback_ = host_message_received_callback;
|
| }
|
|
|
| -void AppRemotingConnectionHelper::ResetHostMessageReceivedCallback() {
|
| - host_message_received_callback_.Reset();
|
| -}
|
| -
|
| bool AppRemotingConnectionHelper::StartConnection() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| DCHECK(client_);
|
| @@ -148,7 +145,7 @@ void AppRemotingConnectionHelper::HostMessageReceived(
|
| // If a callback is not registered, then the message is passed to a default
|
| // handler for the class based on the message type.
|
| if (!host_message_received_callback_.is_null()) {
|
| - host_message_received_callback_.Run(message);
|
| + base::ResetAndReturn(&host_message_received_callback_).Run(message);
|
| } else if (message.type() == "onWindowAdded") {
|
| HandleOnWindowAddedMessage(message);
|
| } else {
|
|
|