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

Unified Diff: remoting/host/setup/start_host_main.cc

Issue 2080343003: Remove calls to MessageLoop::current() in remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/start_host_main.cc
diff --git a/remoting/host/setup/start_host_main.cc b/remoting/host/setup/start_host_main.cc
index b6213f770ed6a0dd8f690d42ab7e7ad1ee18d77c..9a87abb3f6efcf84f3769f65b5af5f5494d4b580 100644
--- a/remoting/host/setup/start_host_main.cc
+++ b/remoting/host/setup/start_host_main.cc
@@ -10,6 +10,7 @@
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
@@ -86,7 +87,7 @@ std::string ReadString(bool no_echo) {
// Called when the HostStarter has finished.
void OnDone(HostStarter::Result result) {
- if (base::MessageLoop::current() != g_message_loop) {
+ if (!g_message_loop->task_runner()->BelongsToCurrentThread()) {
g_message_loop->PostTask(FROM_HERE, base::Bind(&OnDone, result));
return;
}
@@ -238,4 +239,4 @@ int StartHostMain(int argc, char** argv) {
return g_started ? 0 : 1;
}
-} // namespace remoting
+} // namespace remoting
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698