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

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 8 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/utility_process_host_impl.h ('k') | content/common/sandbox_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/utility_process_host_impl.cc
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index c025a4a6e9dc53b9b7485163832f4fa553b12338..4a05b3f21d7fbaaac3276d72db1f27ccf2c21c72 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -255,7 +255,7 @@ bool UtilityProcessHostImpl::StartProcess() {
std::string channel_id = process_->GetHost()->CreateChannel();
if (channel_id.empty()) {
- NotifyAndDelete();
+ NotifyAndDelete(LAUNCH_RESULT_FAILURE);
return false;
}
@@ -374,14 +374,15 @@ bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) {
return true;
}
-void UtilityProcessHostImpl::OnProcessLaunchFailed() {
+void UtilityProcessHostImpl::OnProcessLaunchFailed(int error_code) {
if (!client_.get())
return;
client_task_runner_->PostTask(
FROM_HERE,
base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed,
- client_.get()));
+ client_.get(),
+ error_code));
}
void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) {
@@ -394,20 +395,22 @@ void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) {
exit_code));
}
-void UtilityProcessHostImpl::NotifyAndDelete() {
+void UtilityProcessHostImpl::NotifyAndDelete(int error_code) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&UtilityProcessHostImpl::NotifyLaunchFailedAndDelete,
- weak_ptr_factory_.GetWeakPtr()));
+ weak_ptr_factory_.GetWeakPtr(),
+ error_code));
}
// static
void UtilityProcessHostImpl::NotifyLaunchFailedAndDelete(
- base::WeakPtr<UtilityProcessHostImpl> host) {
+ base::WeakPtr<UtilityProcessHostImpl> host,
+ int error_code) {
if (!host)
return;
- host->OnProcessLaunchFailed();
+ host->OnProcessLaunchFailed(error_code);
delete host.get();
}
« no previous file with comments | « content/browser/utility_process_host_impl.h ('k') | content/common/sandbox_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698