diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/utility_process_host.cc | 2 | ||||
-rw-r--r-- | content/browser/utility_process_host.h | 8 | ||||
-rw-r--r-- | content/common/content_switches.cc | 3 | ||||
-rw-r--r-- | content/common/content_switches.h | 2 | ||||
-rw-r--r-- | content/common/sandbox_init_wrapper_mac.cc | 1 | ||||
-rw-r--r-- | content/common/sandbox_policy.cc | 5 |
6 files changed, 10 insertions, 11 deletions
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc index d7f57f3..999e477 100644 --- a/content/browser/utility_process_host.cc +++ b/content/browser/utility_process_host.cc @@ -124,7 +124,7 @@ bool UtilityProcessHost::StartProcess() { exposed_dir_, #elif defined(OS_POSIX) false, - base::environment_vector(), + env_, #endif cmd_line); diff --git a/content/browser/utility_process_host.h b/content/browser/utility_process_host.h index 69389a2..52f4fff 100644 --- a/content/browser/utility_process_host.h +++ b/content/browser/utility_process_host.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" +#include "base/process_util.h" #include "content/browser/browser_child_process_host.h" #include "content/browser/browser_thread.h" #include "content/common/content_export.h" @@ -62,10 +63,11 @@ class CONTENT_EXPORT UtilityProcessHost : public BrowserChildProcessHost { void EndBatchMode(); void set_exposed_dir(const FilePath& dir) { exposed_dir_ = dir; } - void set_no_sandbox(bool flag) { no_sandbox_ = flag; } - void set_child_flags(int flags) { child_flags_ = flags; } +#if defined(OS_POSIX) + void set_env(const base::environment_vector& env) { env_ = env; } +#endif protected: // Allow these methods to be overridden for tests. @@ -100,6 +102,8 @@ class CONTENT_EXPORT UtilityProcessHost : public BrowserChildProcessHost { // Flags defined in ChildProcessHost with which to start the process. int child_flags_; + base::environment_vector env_; + bool started_; DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); diff --git a/content/common/content_switches.cc b/content/common/content_switches.cc index a6aa110..52d0362 100644 --- a/content/common/content_switches.cc +++ b/content/common/content_switches.cc @@ -405,9 +405,6 @@ const char kRecordMode[] = "record-mode"; // renderer or plugin host. If it's empty, it's the browser. const char kProcessType[] = "type"; -// Causes the process to run as a profile import subprocess. -const char kProfileImportProcess[] = "profile-import"; - // Register Pepper plugins (see pepper_plugin_registry.cc for its format). const char kRegisterPepperPlugins[] = "register-pepper-plugins"; diff --git a/content/common/content_switches.h b/content/common/content_switches.h index 41385d1..26b5e05 100644 --- a/content/common/content_switches.h +++ b/content/common/content_switches.h @@ -130,8 +130,6 @@ extern const char kPpapiStartupDialog[]; extern const char kProcessPerSite[]; CONTENT_EXPORT extern const char kProcessPerTab[]; CONTENT_EXPORT extern const char kProcessType[]; -// TODO(jam): this doesn't belong in content. -extern const char kProfileImportProcess[]; CONTENT_EXPORT extern const char kRecordMode[]; extern const char kRegisterPepperPlugins[]; CONTENT_EXPORT extern const char kRemoteShellPort[]; diff --git a/content/common/sandbox_init_wrapper_mac.cc b/content/common/sandbox_init_wrapper_mac.cc index 31fb302..00c6f26 100644 --- a/content/common/sandbox_init_wrapper_mac.cc +++ b/content/common/sandbox_init_wrapper_mac.cc @@ -57,7 +57,6 @@ bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line, } else if (process_type == switches::kGpuProcess) { sandbox_process_type = Sandbox::SANDBOX_TYPE_GPU; } else if ((process_type == switches::kPluginProcess) || - (process_type == switches::kProfileImportProcess) || (process_type == switches::kServiceProcess)) { return true; } else if (process_type == switches::kPpapiPluginProcess) { diff --git a/content/common/sandbox_policy.cc b/content/common/sandbox_policy.cc index 510d04d..8d5d37a 100644 --- a/content/common/sandbox_policy.cc +++ b/content/common/sandbox_policy.cc @@ -426,8 +426,9 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line, VLOG(1) << "GPU sandbox is disabled"; } - if (browser_command_line.HasSwitch(switches::kNoSandbox)) { - // The user has explicity opted-out from all sandboxing. + if (browser_command_line.HasSwitch(switches::kNoSandbox) || + cmd_line->HasSwitch(switches::kNoSandbox)) { + // The user or the caller has explicity opted-out from all sandboxing. in_sandbox = false; } |