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

Unified Diff: content/browser/browser_child_process_host_impl.cc

Issue 18119009: Make utility process run in-process when running in single-process mode. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: undo unnecessary changes Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_child_process_host_impl.cc
===================================================================
--- content/browser/browser_child_process_host_impl.cc (revision 210446)
+++ content/browser/browser_child_process_host_impl.cc (working copy)
@@ -260,39 +260,41 @@
void BrowserChildProcessHostImpl::OnChildDisconnected() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DCHECK(data_.handle != base::kNullProcessHandle);
- int exit_code;
- base::TerminationStatus status = GetTerminationStatus(&exit_code);
- switch (status) {
- case base::TERMINATION_STATUS_PROCESS_CRASHED:
- case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: {
- delegate_->OnProcessCrashed(exit_code);
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&NotifyProcessCrashed, data_));
- UMA_HISTOGRAM_ENUMERATION("ChildProcess.Crashed2",
- data_.process_type,
- PROCESS_TYPE_MAX);
- break;
+ if (child_process_.get() || data_.handle) {
+ DCHECK(data_.handle != base::kNullProcessHandle);
+ int exit_code;
+ base::TerminationStatus status = GetTerminationStatus(&exit_code);
+ switch (status) {
+ case base::TERMINATION_STATUS_PROCESS_CRASHED:
+ case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: {
+ delegate_->OnProcessCrashed(exit_code);
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(&NotifyProcessCrashed, data_));
+ UMA_HISTOGRAM_ENUMERATION("ChildProcess.Crashed2",
+ data_.process_type,
+ PROCESS_TYPE_MAX);
+ break;
+ }
+ case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: {
+ delegate_->OnProcessCrashed(exit_code);
+ // Report that this child process was killed.
+ UMA_HISTOGRAM_ENUMERATION("ChildProcess.Killed2",
+ data_.process_type,
+ PROCESS_TYPE_MAX);
+ break;
+ }
+ case base::TERMINATION_STATUS_STILL_RUNNING: {
+ UMA_HISTOGRAM_ENUMERATION("ChildProcess.DisconnectedAlive2",
+ data_.process_type,
+ PROCESS_TYPE_MAX);
+ }
+ default:
+ break;
}
- case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: {
- delegate_->OnProcessCrashed(exit_code);
- // Report that this child process was killed.
- UMA_HISTOGRAM_ENUMERATION("ChildProcess.Killed2",
- data_.process_type,
- PROCESS_TYPE_MAX);
- break;
- }
- case base::TERMINATION_STATUS_STILL_RUNNING: {
- UMA_HISTOGRAM_ENUMERATION("ChildProcess.DisconnectedAlive2",
- data_.process_type,
- PROCESS_TYPE_MAX);
- }
- default:
- break;
+ UMA_HISTOGRAM_ENUMERATION("ChildProcess.Disconnected2",
+ data_.process_type,
+ PROCESS_TYPE_MAX);
}
- UMA_HISTOGRAM_ENUMERATION("ChildProcess.Disconnected2",
- data_.process_type,
- PROCESS_TYPE_MAX);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&NotifyProcessHostDisconnected, data_));
delete delegate_; // Will delete us
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698