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

Unified Diff: remoting/test/app_remoting_connection_helper.cc

Issue 1219923011: Added image pattern comparison logic for test interface and fixture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "Minor update on comments" Created 5 years, 5 months 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/test/app_remoting_connection_helper.h ('k') | remoting/test/app_remoting_latency_test_fixture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « remoting/test/app_remoting_connection_helper.h ('k') | remoting/test/app_remoting_latency_test_fixture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698