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

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 98603007: Launches a privileged utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually works now. Removes unnecessary logging. Created 7 years 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: 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..a511820bc18ab15796b9f567f9e7acde639b7062 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -73,6 +73,7 @@ UtilityProcessHostImpl::UtilityProcessHostImpl(
is_batch_mode_(false),
is_mdns_enabled_(false),
no_sandbox_(false),
+ run_elevated_(false),
#if defined(OS_LINUX)
child_flags_(ChildProcessHost::CHILD_ALLOW_SELF),
#else
@@ -120,6 +121,11 @@ void UtilityProcessHostImpl::DisableSandbox() {
no_sandbox_ = true;
}
+void UtilityProcessHostImpl::ElevatePrivileges() {
+ no_sandbox_ = true;
+ run_elevated_ = true;
+}
+
void UtilityProcessHostImpl::EnableZygote() {
use_linux_zygote_ = true;
}
@@ -225,6 +231,7 @@ bool UtilityProcessHostImpl::StartProcess() {
process_->Launch(
#if defined(OS_WIN)
new UtilitySandboxedProcessLauncherDelegate(exposed_dir_),
+ run_elevated_,
#elif defined(OS_POSIX)
use_zygote,
env_,

Powered by Google App Engine
This is Rietveld 408576698