Plumb explicit IPC task runner through to IPC::Channel creation
In preparation for a follow-up CL, IPC::ChannelMojo needs to
know which TaskRunner it will be used from despite being constructed
on some arbitray other thread (for e.g. ChannelProxy).
This CL plumbs through an IPC TaskRunner to various Channel
instantiation sites to avoid lots of noise in the other CL.
There are no behavioral changes introduced here.
BUG=612500,619202
Review-Url: https://codereview.chromium.org/2159293002
Cr-Commit-Position: refs/heads/master@{#406486}
diff --git a/ipc/ipc_perftest_support.cc b/ipc/ipc_perftest_support.cc
index 2932ce8..ec6f9d17 100644
--- a/ipc/ipc_perftest_support.cc
+++ b/ipc/ipc_perftest_support.cc
@@ -20,6 +20,7 @@
#include "base/test/perf_time_logger.h"
#include "base/test/test_io_thread.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "ipc/ipc_channel.h"
@@ -335,8 +336,9 @@
}
std::unique_ptr<Channel> PingPongTestClient::CreateChannel(Listener* listener) {
- return Channel::CreateClient(IPCTestBase::GetChannelName("PerformanceClient"),
- listener);
+ return Channel::CreateClient(
+ IPCTestBase::GetChannelName("PerformanceClient"), listener,
+ base::ThreadTaskRunnerHandle::Get());
}
int PingPongTestClient::RunMain() {