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

Unified Diff: chrome/service/service_utility_process_host.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
Index: chrome/service/service_utility_process_host.cc
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
index f3843c10e620d1df6729639dcc1bdaf57b8ebf4e..3b979047af772212d27102f78fb65a720cea3abe 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -244,12 +244,18 @@ bool ServiceUtilityProcessHost::Launch(base::CommandLine* cmd_line,
if (no_sandbox) {
cmd_line->AppendSwitch(switches::kNoSandbox);
process_ = base::LaunchProcess(*cmd_line, base::LaunchOptions());
+ return process_.IsValid();
} else {
ServiceSandboxedProcessLauncherDelegate delegate;
- process_ = content::StartSandboxedProcess(
- &delegate, cmd_line, base::HandlesToInheritVector());
+ base::Process process;
+ sandbox::ResultCode result = content::StartSandboxedProcess(
+ &delegate, cmd_line, base::HandlesToInheritVector(), &process);
+ if (result == sandbox::SBOX_ALL_OK) {
+ process_ = std::move(process);
+ return true;
+ }
+ return false;
}
- return process_.IsValid();
}
bool ServiceUtilityProcessHost::Send(IPC::Message* msg) {
« no previous file with comments | « chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc ('k') | components/metrics/stability_metrics_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698