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

Side by Side Diff: ipc/attachment_broker_mac_unittest.cc

Issue 1739203004: Add support for Attachment Brokering of IPC::Channels on multiple threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 9 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/attachment_broker.cc ('k') | ipc/attachment_broker_privileged.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <fcntl.h> 7 #include <fcntl.h>
8 #include <mach/mach_vm.h> 8 #include <mach/mach_vm.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/mman.h> 10 #include <sys/mman.h>
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 LOG(INFO) << "Privileged process start."; 556 LOG(INFO) << "Privileged process start.";
557 scoped_ptr<ChildProcessGlobals> globals(CommonChildProcessSetUp()); 557 scoped_ptr<ChildProcessGlobals> globals(CommonChildProcessSetUp());
558 558
559 mach_msg_type_number_t active_names_at_start = IPC::GetActiveNameCount(); 559 mach_msg_type_number_t active_names_at_start = IPC::GetActiveNameCount();
560 560
561 base::MessageLoopForIO main_message_loop; 561 base::MessageLoopForIO main_message_loop;
562 ProxyListener listener; 562 ProxyListener listener;
563 563
564 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( 564 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
565 IPCTestBase::GetChannelName(channel_name), &listener)); 565 IPCTestBase::GetChannelName(channel_name), &listener));
566 globals->broker->RegisterCommunicationChannel(channel.get()); 566 globals->broker->RegisterCommunicationChannel(channel.get(), nullptr);
567 CHECK(channel->Connect()); 567 CHECK(channel->Connect());
568 568
569 globals->initial_resident_size = GetResidentSize(); 569 globals->initial_resident_size = GetResidentSize();
570 570
571 while (true) { 571 while (true) {
572 if (globals->message_logging) 572 if (globals->message_logging)
573 LOG(INFO) << "Privileged process spinning run loop."; 573 LOG(INFO) << "Privileged process spinning run loop.";
574 base::MessageLoop::current()->Run(); 574 base::MessageLoop::current()->Run();
575 ProxyListener::Reason reason = listener.get_reason(); 575 ProxyListener::Reason reason = listener.get_reason();
576 if (reason == ProxyListener::CHANNEL_ERROR) 576 if (reason == ProxyListener::CHANNEL_ERROR)
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 SendControlMessage(sender, success); 1328 SendControlMessage(sender, success);
1329 } 1329 }
1330 } 1330 }
1331 1331
1332 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(MemoryUsageManyMessages) { 1332 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(MemoryUsageManyMessages) {
1333 return CommonPrivilegedProcessMain(&MemoryUsageManyMessagesCallback, 1333 return CommonPrivilegedProcessMain(&MemoryUsageManyMessagesCallback,
1334 "MemoryUsageManyMessages"); 1334 "MemoryUsageManyMessages");
1335 } 1335 }
1336 1336
1337 } // namespace 1337 } // namespace
OLDNEW
« no previous file with comments | « ipc/attachment_broker.cc ('k') | ipc/attachment_broker_privileged.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698