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

Side by Side Diff: ipc/ipc_perftests.cc

Issue 307653003: Introduce IPC::Channel::Create*() to ensure it being heap-allocated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows build, landing again. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_fuzzing_tests.cc ('k') | ipc/ipc_send_fds_test.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 sender()->Send(message); 258 sender()->Send(message);
259 259
260 EXPECT_TRUE(WaitForClientShutdown()); 260 EXPECT_TRUE(WaitForClientShutdown());
261 DestroyChannel(); 261 DestroyChannel();
262 } 262 }
263 263
264 // This message loop bounces all messages back to the sender. 264 // This message loop bounces all messages back to the sender.
265 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(PerformanceClient) { 265 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(PerformanceClient) {
266 base::MessageLoopForIO main_message_loop; 266 base::MessageLoopForIO main_message_loop;
267 ChannelReflectorListener listener; 267 ChannelReflectorListener listener;
268 IPC::Channel channel(IPCTestBase::GetChannelName("PerformanceClient"), 268 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
269 IPC::Channel::MODE_CLIENT, 269 IPCTestBase::GetChannelName("PerformanceClient"), &listener));
270 &listener); 270 listener.Init(channel.get());
271 listener.Init(&channel); 271 CHECK(channel->Connect());
272 CHECK(channel.Connect());
273 272
274 base::MessageLoop::current()->Run(); 273 base::MessageLoop::current()->Run();
275 return 0; 274 return 0;
276 } 275 }
277 276
278 } // namespace 277 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_fuzzing_tests.cc ('k') | ipc/ipc_send_fds_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698