| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| ===================================================================
|
| --- content/browser/renderer_host/render_process_host_impl.cc (revision 188735)
|
| +++ content/browser/renderer_host/render_process_host_impl.cc (working copy)
|
| @@ -128,6 +128,8 @@
|
| #if defined(OS_WIN)
|
| #include "base/win/scoped_com_initializer.h"
|
| #include "content/common/font_cache_dispatcher_win.h"
|
| +#include "content/common/sandbox_win.h"
|
| +#include "content/public/common/sandboxed_process_launcher_delegate.h"
|
| #endif
|
|
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| @@ -283,6 +285,21 @@
|
| return map;
|
| }
|
|
|
| +#if defined(OS_WIN)
|
| +class RendererSandboxedProcessLauncherDelegate
|
| + : public content::SandboxedProcessLauncherDelegate {
|
| + public:
|
| + RendererSandboxedProcessLauncherDelegate() {}
|
| + virtual ~RendererSandboxedProcessLauncherDelegate() {}
|
| +
|
| + virtual void PreSpawnTarget(sandbox::TargetPolicy* policy,
|
| + bool* success) {
|
| + AddBaseHandleClosePolicy(policy);
|
| + GetContentClient()->browser()->PreSpawnRenderer(policy, success);
|
| + }
|
| +};
|
| +#endif // OS_WIN
|
| +
|
| } // namespace
|
|
|
| // Stores the maximum number of renderer processes the content module can
|
| @@ -487,7 +504,7 @@
|
| // at this stage.
|
| child_process_launcher_.reset(new ChildProcessLauncher(
|
| #if defined(OS_WIN)
|
| - base::FilePath(),
|
| + new RendererSandboxedProcessLauncherDelegate,
|
| #elif defined(OS_POSIX)
|
| renderer_prefix.empty(),
|
| base::EnvironmentVector(),
|
|
|