diff options
Diffstat (limited to 'chromeos/process_proxy/process_proxy.cc')
-rw-r--r-- | chromeos/process_proxy/process_proxy.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chromeos/process_proxy/process_proxy.cc b/chromeos/process_proxy/process_proxy.cc index 76ce5f2..4907d8b 100644 --- a/chromeos/process_proxy/process_proxy.cc +++ b/chromeos/process_proxy/process_proxy.cc @@ -10,10 +10,13 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_util.h" +#include "base/location.h" #include "base/logging.h" #include "base/posix/eintr_wrapper.h" #include "base/process/launch.h" #include "base/process/process.h" +#include "base/single_thread_task_runner.h" +#include "base/thread_task_runner_handle.h" #include "base/threading/thread.h" #include "third_party/cros_system_api/switches/chrome_switches.h" @@ -85,7 +88,7 @@ bool ProcessProxy::StartWatchingOnThread( callback_set_ = true; callback_ = callback; - callback_runner_ = base::MessageLoopProxy::current(); + callback_runner_ = base::ThreadTaskRunnerHandle::Get(); // This object will delete itself once watching is stopped. // It also takes ownership of the passed fds. @@ -99,9 +102,9 @@ bool ProcessProxy::StartWatchingOnThread( shutdown_pipe_[PIPE_END_READ] = -1; // |watch| thread is blocked by |output_watcher| from now on. - watch_thread->message_loop()->PostTask(FROM_HERE, - base::Bind(&ProcessOutputWatcher::Start, - base::Unretained(output_watcher))); + watch_thread->task_runner()->PostTask( + FROM_HERE, base::Bind(&ProcessOutputWatcher::Start, + base::Unretained(output_watcher))); watcher_started_ = true; return true; } |