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

Unified Diff: remoting/host/chromoting_host_unittest.cc

Issue 8493020: Move code in src/remoting to the new callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: - Created 9 years, 1 month 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/host/chromoting_host.cc ('k') | remoting/host/continue_window_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_unittest.cc
diff --git a/remoting/host/chromoting_host_unittest.cc b/remoting/host/chromoting_host_unittest.cc
index 9a636c08d521eb865c7ab96da011faa74b4c5442..d5e4df64fa18a3142da1d5b4d38c135de5ef8b62 100644
--- a/remoting/host/chromoting_host_unittest.cc
+++ b/remoting/host/chromoting_host_unittest.cc
@@ -171,24 +171,20 @@ class ChromotingHostTest : public testing::Test {
connection->set_host_stub(client.get());
context_.network_message_loop()->PostTask(
- FROM_HERE,
- NewRunnableFunction(&ChromotingHostTest::AddClientToHost,
- host_, client));
+ FROM_HERE, base::Bind(&ChromotingHostTest::AddClientToHost,
+ host_, client));
if (authenticate) {
context_.network_message_loop()->PostTask(
- FROM_HERE,
- NewRunnableMethod(client.get(),
- &ClientSession::OnAuthenticationComplete));
+ FROM_HERE, base::Bind(&ClientSession::OnAuthenticationComplete,
+ client.get()));
}
}
// Helper method to remove a client connection from ChromotingHost.
void RemoveClientConnection() {
context_.network_message_loop()->PostTask(
- FROM_HERE,
- NewRunnableMethod(host_.get(),
- &ChromotingHost::OnClientDisconnected,
- connection_));
+ FROM_HERE, base::Bind(&ChromotingHost::OnClientDisconnected,
+ host_.get(), connection_));
}
static void AddClientToHost(scoped_refptr<ChromotingHost> host,
@@ -197,8 +193,7 @@ class ChromotingHostTest : public testing::Test {
}
void ShutdownHost() {
- host_->Shutdown(
- NewRunnableFunction(&PostQuitTask, &message_loop_));
+ host_->Shutdown(base::Bind(&PostQuitTask, &message_loop_));
}
protected:
@@ -237,9 +232,9 @@ TEST_F(ChromotingHostTest, DISABLED_StartAndShutdown) {
host_->Start();
message_loop_.PostTask(
- FROM_HERE,NewRunnableMethod(
- host_.get(), &ChromotingHost::Shutdown,
- NewRunnableFunction(&PostQuitTask, &message_loop_)));
+ FROM_HERE, base::Bind(
+ &ChromotingHost::Shutdown, host_.get(),
+ base::Bind(&PostQuitTask, &message_loop_)));
message_loop_.Run();
}
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/continue_window_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698