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

Unified Diff: ipc/mojo/ipc_mojo_perftest.cc

Issue 1069943003: Revert of ChannelMojo: Ensure that it always has ScopedIPCSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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') | no next file » | 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 dc96dd19a1448f11347acc769e6f372270a16f99..9f063ab8dee9ae46cbad819c7affc6d0bc0266bb 100644
--- a/ipc/mojo/ipc_mojo_perftest.cc
+++ b/ipc/mojo/ipc_mojo_perftest.cc
@@ -31,15 +31,17 @@
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(),
- runner, handle);
+ handle);
}
bool DidStartClient() override {
@@ -50,6 +52,7 @@
}
private:
+ scoped_ptr<IPC::ScopedIPCSupport> ipc_support_;
scoped_ptr<IPC::ChannelMojoHost> host_;
};
@@ -79,6 +82,9 @@
MojoTestClient();
scoped_ptr<IPC::Channel> CreateChannel(IPC::Listener* listener) override;
+
+ private:
+ scoped_ptr<IPC::ScopedIPCSupport> ipc_support_;
};
MojoTestClient::MojoTestClient() {
@@ -87,9 +93,12 @@
scoped_ptr<IPC::Channel> MojoTestClient::CreateChannel(
IPC::Listener* listener) {
- return scoped_ptr<IPC::Channel>(IPC::ChannelMojo::Create(
- NULL, task_runner(), IPCTestBase::GetChannelName("PerformanceClient"),
- IPC::Channel::MODE_CLIENT, 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));
}
MULTIPROCESS_IPC_TEST_CLIENT_MAIN(PerformanceClient) {
« no previous file with comments | « ipc/mojo/ipc_channel_mojo_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698