| Index: content/browser/utility_process_host_impl.cc
|
| ===================================================================
|
| --- content/browser/utility_process_host_impl.cc (revision 188735)
|
| +++ content/browser/utility_process_host_impl.cc (working copy)
|
| @@ -20,8 +20,30 @@
|
| #include "ui/base/ui_base_switches.h"
|
| #include "webkit/plugins/plugin_switches.h"
|
|
|
| +#if defined(OS_WIN)
|
| +#include "content/public/common/sandboxed_process_launcher_delegate.h"
|
| +#endif
|
| +
|
| namespace content {
|
|
|
| +#if defined(OS_WIN)
|
| +class UtilitySandboxedProcessLauncherDelegate
|
| + : public SandboxedProcessLauncherDelegate {
|
| + public:
|
| + explicit UtilitySandboxedProcessLauncherDelegate(
|
| + const base::FilePath& exposed_dir) : exposed_dir_(exposed_dir) {}
|
| + virtual ~UtilitySandboxedProcessLauncherDelegate() {}
|
| +
|
| + virtual void PreSandbox(bool* disable_default_policy,
|
| + base::FilePath* exposed_dir) {
|
| + *exposed_dir = exposed_dir_;
|
| + }
|
| +
|
| +private:
|
| + base::FilePath exposed_dir_;
|
| +};
|
| +#endif
|
| +
|
| UtilityProcessHost* UtilityProcessHost::Create(
|
| UtilityProcessHostClient* client,
|
| base::SequencedTaskRunner* client_task_runner) {
|
| @@ -170,7 +192,7 @@
|
|
|
| process_->Launch(
|
| #if defined(OS_WIN)
|
| - exposed_dir_,
|
| + new UtilitySandboxedProcessLauncherDelegate(exposed_dir_),
|
| #elif defined(OS_POSIX)
|
| use_zygote,
|
| env_,
|
|
|