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

Unified Diff: ipc/mojo/ipc_mojo_perftest.cc

Issue 1054253005: ChannelMojo: Ensure that it always has ScopedIPCSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the ipc_fuzzer breakage Created 5 years, 8 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/mojo/ipc_channel_mojo_unittest.cc ('k') | tools/ipc_fuzzer/message_replay/replay_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_mojo_perftest.cc
diff --git a/ipc/mojo/ipc_mojo_perftest.cc b/ipc/mojo/ipc_mojo_perftest.cc
index 9f063ab8dee9ae46cbad819c7affc6d0bc0266bb..dc96dd19a1448f11347acc769e6f372270a16f99 100644
--- a/ipc/mojo/ipc_mojo_perftest.cc
+++ b/ipc/mojo/ipc_mojo_perftest.cc
@@ -31,17 +31,15 @@ public:
MojoChannelPerfTest();
void TearDown() override {
- ipc_support_.reset();
IPC::test::IPCChannelPerfTestBase::TearDown();
}
scoped_ptr<IPC::ChannelFactory> CreateChannelFactory(
const IPC::ChannelHandle& handle,
base::SequencedTaskRunner* runner) override {
- ipc_support_.reset(new IPC::ScopedIPCSupport(runner));
host_.reset(new IPC::ChannelMojoHost(runner));
return IPC::ChannelMojo::CreateServerFactory(host_->channel_delegate(),
- handle);
+ runner, handle);
}
bool DidStartClient() override {
@@ -52,7 +50,6 @@ public:
}
private:
- scoped_ptr<IPC::ScopedIPCSupport> ipc_support_;
scoped_ptr<IPC::ChannelMojoHost> host_;
};
@@ -82,9 +79,6 @@ class MojoTestClient : public IPC::test::PingPongTestClient {
MojoTestClient();
scoped_ptr<IPC::Channel> CreateChannel(IPC::Listener* listener) override;
-
- private:
- scoped_ptr<IPC::ScopedIPCSupport> ipc_support_;
};
MojoTestClient::MojoTestClient() {
@@ -93,12 +87,9 @@ MojoTestClient::MojoTestClient() {
scoped_ptr<IPC::Channel> MojoTestClient::CreateChannel(
IPC::Listener* listener) {
- ipc_support_.reset(new IPC::ScopedIPCSupport(task_runner()));
- return scoped_ptr<IPC::Channel>(
- IPC::ChannelMojo::Create(NULL,
- IPCTestBase::GetChannelName("PerformanceClient"),
- IPC::Channel::MODE_CLIENT,
- listener));
+ return scoped_ptr<IPC::Channel>(IPC::ChannelMojo::Create(
+ NULL, task_runner(), IPCTestBase::GetChannelName("PerformanceClient"),
+ IPC::Channel::MODE_CLIENT, listener));
}
MULTIPROCESS_IPC_TEST_CLIENT_MAIN(PerformanceClient) {
« no previous file with comments | « ipc/mojo/ipc_channel_mojo_unittest.cc ('k') | tools/ipc_fuzzer/message_replay/replay_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698