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

Side by Side Diff: content/common/child_process_host_impl.cc

Issue 1367013003: ipc: Change the timing of the construction of the attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | ipc/attachment_broker.cc » ('j') | ipc/attachment_broker.cc » ('J')
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/common/child_process_host_impl.h" 5 #include "content/common/child_process_host_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 PathService::Get(CHILD_PROCESS_EXE, &child_path); 104 PathService::Get(CHILD_PROCESS_EXE, &child_path);
105 return child_path; 105 return child_path;
106 } 106 }
107 107
108 ChildProcessHostImpl::ChildProcessHostImpl(ChildProcessHostDelegate* delegate) 108 ChildProcessHostImpl::ChildProcessHostImpl(ChildProcessHostDelegate* delegate)
109 : delegate_(delegate), 109 : delegate_(delegate),
110 opening_channel_(false) { 110 opening_channel_(false) {
111 #if defined(OS_WIN) 111 #if defined(OS_WIN)
112 AddFilter(new FontCacheDispatcher()); 112 AddFilter(new FontCacheDispatcher());
113 #endif 113 #endif
114 #if USE_ATTACHMENT_BROKER
115 // Ensure that the privileged attachment broker gets constructed early in the
116 // life cycle of making a child process. This ensures that when a test is
Tom Sepez 2015/09/25 15:37:34 nit: just "life cycle of a child process".
erikchen 2015/09/25 19:27:04 Done.
117 // being run one of the single process modes, the global attachment broker is
Tom Sepez 2015/09/25 15:37:34 nit: "being run in one of the"
erikchen 2015/09/25 19:27:04 Done.
118 // the privileged attachment broker, rather than an unprivileged attachment
119 // broker.
120 GetAttachmentBroker();
121 #endif
114 } 122 }
115 123
116 ChildProcessHostImpl::~ChildProcessHostImpl() { 124 ChildProcessHostImpl::~ChildProcessHostImpl() {
117 #if USE_ATTACHMENT_BROKER 125 #if USE_ATTACHMENT_BROKER
118 GetAttachmentBroker()->DeregisterCommunicationChannel(channel_.get()); 126 GetAttachmentBroker()->DeregisterCommunicationChannel(channel_.get());
119 #endif 127 #endif
120 for (size_t i = 0; i < filters_.size(); ++i) { 128 for (size_t i = 0; i < filters_.size(); ++i) {
121 filters_[i]->OnChannelClosing(); 129 filters_[i]->OnChannelClosing();
122 filters_[i]->OnFilterRemoved(); 130 filters_[i]->OnFilterRemoved();
123 } 131 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 336 }
329 337
330 void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer( 338 void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer(
331 gfx::GpuMemoryBufferId id, 339 gfx::GpuMemoryBufferId id,
332 uint32 sync_point) { 340 uint32 sync_point) {
333 // Note: Nothing to do here as ownership of shared memory backed 341 // Note: Nothing to do here as ownership of shared memory backed
334 // GpuMemoryBuffers is passed with IPC. 342 // GpuMemoryBuffers is passed with IPC.
335 } 343 }
336 344
337 } // namespace content 345 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ipc/attachment_broker.cc » ('j') | ipc/attachment_broker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698