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

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

Issue 9235052: Fix race condition in utility process clients (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to ToT Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 data_.type, 222 data_.type,
223 content::PROCESS_TYPE_MAX); 223 content::PROCESS_TYPE_MAX);
224 if (disconnect_was_alive_) { 224 if (disconnect_was_alive_) {
225 UMA_HISTOGRAM_ENUMERATION("ChildProcess.CrashedWasAlive", 225 UMA_HISTOGRAM_ENUMERATION("ChildProcess.CrashedWasAlive",
226 data_.type, 226 data_.type,
227 content::PROCESS_TYPE_MAX); 227 content::PROCESS_TYPE_MAX);
228 } 228 }
229 break; 229 break;
230 } 230 }
231 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: { 231 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: {
232 delegate_->OnProcessCrashed(exit_code);
232 // Report that this child process was killed. 233 // Report that this child process was killed.
233 UMA_HISTOGRAM_ENUMERATION("ChildProcess.Killed", 234 UMA_HISTOGRAM_ENUMERATION("ChildProcess.Killed",
234 data_.type, 235 data_.type,
235 content::PROCESS_TYPE_MAX); 236 content::PROCESS_TYPE_MAX);
236 if (disconnect_was_alive_) { 237 if (disconnect_was_alive_) {
237 UMA_HISTOGRAM_ENUMERATION("ChildProcess.KilledWasAlive", 238 UMA_HISTOGRAM_ENUMERATION("ChildProcess.KilledWasAlive",
238 data_.type, 239 data_.type,
239 content::PROCESS_TYPE_MAX); 240 content::PROCESS_TYPE_MAX);
240 } 241 }
241 break; 242 break;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 310
310 311
311 void BrowserChildProcessHostImpl::OnProcessLaunched() { 312 void BrowserChildProcessHostImpl::OnProcessLaunched() {
312 if (!child_process_->GetHandle()) { 313 if (!child_process_->GetHandle()) {
313 delete delegate_; // Will delete us 314 delete delegate_; // Will delete us
314 return; 315 return;
315 } 316 }
316 data_.handle = child_process_->GetHandle(); 317 data_.handle = child_process_->GetHandle();
317 delegate_->OnProcessLaunched(); 318 delegate_->OnProcessLaunched();
318 } 319 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698