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

Unified Diff: ipc/ipc_send_fds_test.cc

Issue 2159293002: Plumb explicit IPC task runner through to IPC::Channel creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add dcheck Created 4 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 | « ipc/ipc_perftest_support.cc ('k') | ipc/ipc_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_send_fds_test.cc
diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc
index a65601512d8bfbf46615425a4bde4405e2e87b86..033ae397e41ecbcef17870b9b5a6593f344b9abe 100644
--- a/ipc/ipc_send_fds_test.cc
+++ b/ipc/ipc_send_fds_test.cc
@@ -27,6 +27,7 @@ extern "C" {
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "ipc/ipc_message_attachment_set.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_test_base.h"
@@ -156,7 +157,8 @@ int SendFdsClientCommon(const std::string& test_client_name,
// Set up IPC channel.
std::unique_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
- IPCTestBase::GetChannelName(test_client_name), &listener));
+ IPCTestBase::GetChannelName(test_client_name), &listener,
+ main_message_loop.task_runner()));
CHECK(channel->Connect());
// Run message loop.
@@ -251,10 +253,12 @@ class PipeChannelHelper {
void Init() {
IPC::ChannelHandle in_handle("IN");
- in = IPC::Channel::CreateServer(in_handle, &null_listener_);
+ in = IPC::Channel::CreateServer(
+ in_handle, &null_listener_, in_thread_->task_runner());
IPC::ChannelHandle out_handle(
"OUT", base::FileDescriptor(in->TakeClientFileDescriptor()));
- out = IPC::Channel::CreateClient(out_handle, &cb_listener_);
+ out = IPC::Channel::CreateClient(
+ out_handle, &cb_listener_, out_thread_->task_runner());
// PostTask the connect calls to make sure the callbacks happens
// on the right threads.
in_thread_->task_runner()->PostTask(
« no previous file with comments | « ipc/ipc_perftest_support.cc ('k') | ipc/ipc_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698