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

Unified Diff: mojo/system/message_pipe_perftest.cc

Issue 588193004: Mojo: Have |ProxyMessagePipeEndpoint|s constructed with a |ChannelEndpoint|. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « mojo/system/message_pipe_dispatcher.cc ('k') | mojo/system/message_pipe_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe_perftest.cc
diff --git a/mojo/system/message_pipe_perftest.cc b/mojo/system/message_pipe_perftest.cc
index 4c1a1ab1975ea4c6495fd2c1f8870705c14e32c5..33cffeed018593fa7a69ab255c4983986c7205b8 100644
--- a/mojo/system/message_pipe_perftest.cc
+++ b/mojo/system/message_pipe_perftest.cc
@@ -110,10 +110,9 @@ MOJO_MULTIPROCESS_TEST_CHILD_MAIN(PingPongClient) {
embedder::ScopedPlatformHandle client_platform_handle =
mojo::test::MultiprocessTestHelper::client_platform_handle.Pass();
CHECK(client_platform_handle.is_valid());
- scoped_refptr<MessagePipe> mp(new MessagePipe(
- scoped_ptr<MessagePipeEndpoint>(new LocalMessagePipeEndpoint()),
- scoped_ptr<MessagePipeEndpoint>(new ProxyMessagePipeEndpoint())));
- channel_thread.Start(client_platform_handle.Pass(), mp);
+ scoped_refptr<ChannelEndpoint> ep;
+ scoped_refptr<MessagePipe> mp(MessagePipe::CreateLocalProxy(&ep));
+ channel_thread.Start(client_platform_handle.Pass(), ep);
std::string buffer(1000000, '\0');
int rv = 0;
@@ -158,10 +157,9 @@ MOJO_MULTIPROCESS_TEST_CHILD_MAIN(PingPongClient) {
TEST_F(MultiprocessMessagePipePerfTest, PingPong) {
helper()->StartChild("PingPongClient");
- scoped_refptr<MessagePipe> mp(new MessagePipe(
- scoped_ptr<MessagePipeEndpoint>(new LocalMessagePipeEndpoint()),
- scoped_ptr<MessagePipeEndpoint>(new ProxyMessagePipeEndpoint())));
- Init(mp);
+ scoped_refptr<ChannelEndpoint> ep;
+ scoped_refptr<MessagePipe> mp(MessagePipe::CreateLocalProxy(&ep));
+ Init(ep);
// This values are set to align with one at ipc_pertests.cc for comparison.
const size_t kMsgSize[5] = {12, 144, 1728, 20736, 248832};
« no previous file with comments | « mojo/system/message_pipe_dispatcher.cc ('k') | mojo/system/message_pipe_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698