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

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 55133005: Remove EnableZygote API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused |use_linux_zygote_| member variable. Created 7 years, 1 month 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/public/browser/utility_process_host.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 f2b3bc31deeaa3ff2b0fe94726a0309ce4e6c8d3..277a2cf25f3e7bf9a6e252257ef2c010a82cc1c0 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -78,7 +78,6 @@ UtilityProcessHostImpl::UtilityProcessHostImpl(
#else
child_flags_(ChildProcessHost::CHILD_NORMAL),
#endif
- use_linux_zygote_(false),
started_(false) {
}
@@ -120,10 +119,6 @@ void UtilityProcessHostImpl::DisableSandbox() {
no_sandbox_ = true;
}
-void UtilityProcessHostImpl::EnableZygote() {
- use_linux_zygote_ = true;
-}
-
const ChildProcessData& UtilityProcessHostImpl::GetData() {
return process_->GetData();
}
@@ -200,17 +195,17 @@ bool UtilityProcessHostImpl::StartProcess() {
cmd_line->AppendSwitch(switches::kDebugPluginLoading);
#if defined(OS_POSIX)
- // TODO(port): Sandbox this on Linux. Also, zygote this to work with
- // Linux updating.
if (has_cmd_prefix) {
- // launch the utility child process with some prefix
+ // Launch the utility child process with some prefix
// (usually "xterm -e gdb --args").
cmd_line->PrependWrapper(browser_command_line.GetSwitchValueNative(
switches::kUtilityCmdPrefix));
}
- cmd_line->AppendSwitchPath(switches::kUtilityProcessAllowedDir,
- exposed_dir_);
+ if (!exposed_dir_.empty()) {
+ cmd_line->AppendSwitchPath(switches::kUtilityProcessAllowedDir,
+ exposed_dir_);
+ }
#endif
if (is_mdns_enabled_)
@@ -219,7 +214,9 @@ bool UtilityProcessHostImpl::StartProcess() {
bool use_zygote = false;
#if defined(OS_LINUX)
- use_zygote = !no_sandbox_ && use_linux_zygote_;
+ // The Linux sandbox does not support granting access to a single directory,
+ // so we need to bypass the zygote in that case.
+ use_zygote = !no_sandbox_ && exposed_dir_.empty();
#endif
process_->Launch(
« no previous file with comments | « content/browser/utility_process_host_impl.h ('k') | content/public/browser/utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698