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

Side by Side Diff: ipc/mojo/ipc_channel_mojo_unittest.cc

Issue 488003003: Add ChannelProxy benchmark to ipc_perftests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing. 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | mojo/embedder/embedder_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/mojo/ipc_channel_mojo.h" 5 #include "ipc/mojo/ipc_channel_mojo.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 ListenerThatShouldBeNeverCalled never_called_; 109 ListenerThatShouldBeNeverCalled never_called_;
110 }; 110 };
111 111
112 112
113 void IPCChannelMojoTest::CreateMojoChannel(IPC::Listener* listener) { 113 void IPCChannelMojoTest::CreateMojoChannel(IPC::Listener* listener) {
114 CreateChannel(&never_called_); 114 CreateChannel(&never_called_);
115 scoped_ptr<IPC::Channel> mojo_channel = IPC::ChannelMojo::Create( 115 scoped_ptr<IPC::Channel> mojo_channel = IPC::ChannelMojo::Create(
116 ReleaseChannel(), IPC::Channel::MODE_SERVER, listener, 116 ReleaseChannel(), IPC::Channel::MODE_SERVER, listener,
117 io_thread_task_runner()).PassAs<IPC::Channel>(); 117 task_runner()).PassAs<IPC::Channel>();
118 SetChannel(mojo_channel.PassAs<IPC::Channel>()); 118 SetChannel(mojo_channel.PassAs<IPC::Channel>());
119 } 119 }
120 120
121 class TestChannelListenerWithExtraExpectations 121 class TestChannelListenerWithExtraExpectations
122 : public IPC::TestChannelListener { 122 : public IPC::TestChannelListener {
123 public: 123 public:
124 TestChannelListenerWithExtraExpectations() 124 TestChannelListenerWithExtraExpectations()
125 : is_connected_called_(false) { 125 : is_connected_called_(false) {
126 } 126 }
127 127
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 client.Connect(); 259 client.Connect();
260 listener.set_sender(client.channel()); 260 listener.set_sender(client.channel());
261 261
262 base::MessageLoop::current()->Run(); 262 base::MessageLoop::current()->Run();
263 263
264 return 0; 264 return 0;
265 } 265 }
266 #endif 266 #endif
267 267
268 } // namespace 268 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | mojo/embedder/embedder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698