| 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 f2b3bc31deeaa3ff2b0fe94726a0309ce4e6c8d3..7211ea428f8d337b9b940d9935164e32455f2826 100644
|
| --- a/content/browser/utility_process_host_impl.cc
|
| +++ b/content/browser/utility_process_host_impl.cc
|
| @@ -73,6 +73,9 @@ UtilityProcessHostImpl::UtilityProcessHostImpl(
|
| is_batch_mode_(false),
|
| is_mdns_enabled_(false),
|
| no_sandbox_(false),
|
| +#if defined(OS_WIN)
|
| + run_elevated_(false),
|
| +#endif
|
| #if defined(OS_LINUX)
|
| child_flags_(ChildProcessHost::CHILD_ALLOW_SELF),
|
| #else
|
| @@ -120,6 +123,13 @@ void UtilityProcessHostImpl::DisableSandbox() {
|
| no_sandbox_ = true;
|
| }
|
|
|
| +#if defined(OS_WIN)
|
| +void UtilityProcessHostImpl::ElevatePrivileges() {
|
| + no_sandbox_ = true;
|
| + run_elevated_ = true;
|
| +}
|
| +#endif
|
| +
|
| void UtilityProcessHostImpl::EnableZygote() {
|
| use_linux_zygote_ = true;
|
| }
|
| @@ -216,15 +226,14 @@ bool UtilityProcessHostImpl::StartProcess() {
|
| if (is_mdns_enabled_)
|
| cmd_line->AppendSwitch(switches::kUtilityProcessEnableMDns);
|
|
|
| - bool use_zygote = false;
|
| -
|
| #if defined(OS_LINUX)
|
| - use_zygote = !no_sandbox_ && use_linux_zygote_;
|
| + bool use_zygote = !no_sandbox_ && use_linux_zygote_;
|
| #endif
|
|
|
| process_->Launch(
|
| #if defined(OS_WIN)
|
| new UtilitySandboxedProcessLauncherDelegate(exposed_dir_),
|
| + run_elevated_,
|
| #elif defined(OS_POSIX)
|
| use_zygote,
|
| env_,
|
| @@ -244,6 +253,13 @@ bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) {
|
| return true;
|
| }
|
|
|
| +void UtilityProcessHostImpl::OnProcessLaunchFailed() {
|
| + client_task_runner_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed,
|
| + client_.get()));
|
| +}
|
| +
|
| void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) {
|
| client_task_runner_->PostTask(
|
| FROM_HERE,
|
|
|