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

Side by Side Diff: content/browser/browser_child_process_host_impl.cc

Issue 1712143002: [mojo-edk] Add support for transferring mach ports. (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 | « no previous file | content/browser/renderer_host/render_process_host_impl.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 "content/browser/browser_child_process_host_impl.h" 5 #include "content/browser/browser_child_process_host_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/dump_without_crashing.h" 10 #include "base/debug/dump_without_crashing.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // child process. This ensures that when a test is being run in one of the 134 // child process. This ensures that when a test is being run in one of the
135 // single process modes, the global attachment broker is the privileged 135 // single process modes, the global attachment broker is the privileged
136 // attachment broker, rather than an unprivileged attachment broker. 136 // attachment broker, rather than an unprivileged attachment broker.
137 #if defined(OS_MACOSX) && !defined(OS_IOS) 137 #if defined(OS_MACOSX) && !defined(OS_IOS)
138 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( 138 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(
139 MachBroker::GetInstance()); 139 MachBroker::GetInstance());
140 #else 140 #else
141 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); 141 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded();
142 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 142 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
143 #endif // USE_ATTACHMENT_BROKER 143 #endif // USE_ATTACHMENT_BROKER
144 #if defined(OS_MACOSX) && !defined(OS_IOS)
145 mojo::edk::SetMachPortProviderIfNeeded(MachBroker::GetInstance());
jam 2016/03/15 16:27:42 it doesn't make sense that this code is run each t
Anand Mistry (off Chromium) 2016/03/15 20:26:10 I agree, but I think it should be done to both Moj
jam 2016/03/15 23:13:09 yep I meant do both. can they just be moved in thi
Anand Mistry (off Chromium) 2016/03/15 23:30:56 It is small, but this change is already big and co
146 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
144 147
145 child_process_host_.reset(ChildProcessHost::Create(this)); 148 child_process_host_.reset(ChildProcessHost::Create(this));
146 AddFilter(new TraceMessageFilter(data_.id)); 149 AddFilter(new TraceMessageFilter(data_.id));
147 AddFilter(new ProfilerMessageFilter(process_type)); 150 AddFilter(new ProfilerMessageFilter(process_type));
148 AddFilter(new HistogramMessageFilter); 151 AddFilter(new HistogramMessageFilter);
149 AddFilter(new MemoryMessageFilter(this, process_type)); 152 AddFilter(new MemoryMessageFilter(this, process_type));
150 153
151 g_child_process_list.Get().push_back(this); 154 g_child_process_list.Get().push_back(this);
152 GetContentClient()->browser()->BrowserChildProcessHostCreated(this); 155 GetContentClient()->browser()->BrowserChildProcessHostCreated(this);
153 156
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 443
441 #if defined(OS_WIN) 444 #if defined(OS_WIN)
442 445
443 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 446 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
444 OnChildDisconnected(); 447 OnChildDisconnected();
445 } 448 }
446 449
447 #endif 450 #endif
448 451
449 } // namespace content 452 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698