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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 12805004: Remove mention of the nacl process in content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 9 months 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/ppapi_plugin_process_host.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
===================================================================
--- content/browser/renderer_host/render_process_host_impl.cc (revision 189099)
+++ content/browser/renderer_host/render_process_host_impl.cc (working copy)
@@ -129,6 +129,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"
@@ -284,6 +286,22 @@
return map;
}
+#if defined(OS_WIN)
+// NOTE: changes to this class need to be reviewed by the security team.
+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
@@ -488,7 +506,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(),
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698