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

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

Issue 16267002: Re-fix http://crbug.com/87176, and add a test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Second round of creis comments Created 7 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
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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 switches::kLoggingLevel, 149 switches::kLoggingLevel,
150 switches::kV, 150 switches::kV,
151 switches::kVModule, 151 switches::kVModule,
152 #if defined(OS_POSIX) 152 #if defined(OS_POSIX)
153 switches::kChildCleanExit, 153 switches::kChildCleanExit,
154 #endif 154 #endif
155 }; 155 };
156 cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches, 156 cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches,
157 arraysize(kForwardSwitches)); 157 arraysize(kForwardSwitches));
158 158
159 child_process_.reset(new ChildProcessLauncher( 159 child_process_ = NewChildProcessLauncher(
160 #if defined(OS_WIN) 160 #if defined(OS_WIN)
161 delegate, 161 delegate,
162 #elif defined(OS_POSIX) 162 #elif defined(OS_POSIX)
163 use_zygote, 163 use_zygote,
164 environ, 164 environ,
165 child_process_host_->TakeClientFileDescriptor(), 165 child_process_host_->TakeClientFileDescriptor(),
166 #endif 166 #endif
167 cmd_line, 167 cmd_line,
168 data_.id, 168 data_.id,
169 this)); 169 this);
170 } 170 }
171 171
172 const ChildProcessData& BrowserChildProcessHostImpl::GetData() const { 172 const ChildProcessData& BrowserChildProcessHostImpl::GetData() const {
173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
174 return data_; 174 return data_;
175 } 175 }
176 176
177 ChildProcessHost* BrowserChildProcessHostImpl::GetHost() const { 177 ChildProcessHost* BrowserChildProcessHostImpl::GetHost() const {
178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
179 return child_process_host_.get(); 179 return child_process_host_.get();
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 void BrowserChildProcessHostImpl::OnProcessExitedEarly( 342 void BrowserChildProcessHostImpl::OnProcessExitedEarly(
343 base::WaitableEvent* event) { 343 base::WaitableEvent* event) {
344 DeleteProcessWaitableEvent(event); 344 DeleteProcessWaitableEvent(event);
345 OnChildDisconnected(); 345 OnChildDisconnected();
346 } 346 }
347 347
348 #endif 348 #endif
349 349
350 } // namespace content 350 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698