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

Unified Diff: ipc/mojo/ipc_mojo_perftest.cc

Issue 553283002: IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build error Created 6 years, 3 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_mojo_bootstrap_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 d4337037a9dcacda733d77637d7141275cfb0f07..576f13eaa282ce685e86818f051756c078260763 100644
--- a/ipc/mojo/ipc_mojo_perftest.cc
+++ b/ipc/mojo/ipc_mojo_perftest.cc
@@ -5,6 +5,7 @@
#include "base/lazy_instance.h"
#include "ipc/ipc_perftest_support.h"
#include "ipc/mojo/ipc_channel_mojo.h"
+#include "ipc/mojo/ipc_channel_mojo_host.h"
#include "mojo/embedder/test_embedder.h"
namespace {
@@ -31,8 +32,15 @@ public:
virtual scoped_ptr<IPC::ChannelFactory> CreateChannelFactory(
const IPC::ChannelHandle& handle,
base::TaskRunner* runner) OVERRIDE {
- return IPC::ChannelMojo::CreateFactory(
- handle, IPC::Channel::MODE_SERVER, runner);
+ host_.reset(new IPC::ChannelMojoHost(task_runner()));
+ return IPC::ChannelMojo::CreateServerFactory(host_.get(), handle);
+ }
+
+ virtual bool DidStartClient() OVERRIDE {
+ bool ok = IPCTestBase::DidStartClient();
+ DCHECK(ok);
+ host_->OnClientLaunched(client_process());
+ return ok;
}
void set_io_thread_task_runner(base::TaskRunner* runner) {
@@ -41,6 +49,7 @@ public:
private:
base::TaskRunner* io_thread_task_runner_;
+ scoped_ptr<IPC::ChannelMojoHost> host_;
};
MojoChannelPerfTest::MojoChannelPerfTest()
@@ -73,10 +82,11 @@ MojoTestClient::MojoTestClient() {
scoped_ptr<IPC::Channel> MojoTestClient::CreateChannel(
IPC::Listener* listener) {
- return scoped_ptr<IPC::Channel>(IPC::ChannelMojo::Create(
- IPCTestBase::GetChannelName("PerformanceClient"),
- IPC::Channel::MODE_CLIENT, listener,
- 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_mojo_bootstrap_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698