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

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

Issue 1373993002: Revert of 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, 2 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') | 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/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 a child process. This ensures that when a test is being run
117 // in one of the single process modes, the global attachment broker is the
118 // privileged attachment broker, rather than an unprivileged attachment
119 // broker.
120 GetAttachmentBroker();
121 #endif
122 } 114 }
123 115
124 ChildProcessHostImpl::~ChildProcessHostImpl() { 116 ChildProcessHostImpl::~ChildProcessHostImpl() {
125 #if USE_ATTACHMENT_BROKER 117 #if USE_ATTACHMENT_BROKER
126 GetAttachmentBroker()->DeregisterCommunicationChannel(channel_.get()); 118 GetAttachmentBroker()->DeregisterCommunicationChannel(channel_.get());
127 #endif 119 #endif
128 for (size_t i = 0; i < filters_.size(); ++i) { 120 for (size_t i = 0; i < filters_.size(); ++i) {
129 filters_[i]->OnChannelClosing(); 121 filters_[i]->OnChannelClosing();
130 filters_[i]->OnFilterRemoved(); 122 filters_[i]->OnFilterRemoved();
131 } 123 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 328 }
337 329
338 void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer( 330 void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer(
339 gfx::GpuMemoryBufferId id, 331 gfx::GpuMemoryBufferId id,
340 uint32 sync_point) { 332 uint32 sync_point) {
341 // Note: Nothing to do here as ownership of shared memory backed 333 // Note: Nothing to do here as ownership of shared memory backed
342 // GpuMemoryBuffers is passed with IPC. 334 // GpuMemoryBuffers is passed with IPC.
343 } 335 }
344 336
345 } // namespace content 337 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ipc/attachment_broker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698