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

Unified Diff: content/app/startup_helper_win.cc

Issue 10907217: Revert 156550 - Add sandbox support for Windows process mitigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | « no previous file | content/common/sandbox_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/startup_helper_win.cc
===================================================================
--- content/app/startup_helper_win.cc (revision 156553)
+++ content/app/startup_helper_win.cc (working copy)
@@ -10,7 +10,7 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/win/windows_version.h"
-#include "sandbox/win/src/process_mitigations.h"
+#include "sandbox/win/src/dep.h"
#include "sandbox/win/src/sandbox_factory.h"
namespace {
@@ -37,13 +37,12 @@
void InitializeSandboxInfo(sandbox::SandboxInterfaceInfo* info) {
info->broker_services = sandbox::SandboxFactory::GetBrokerServices();
- if (!info->broker_services) {
+ if (!info->broker_services)
info->target_services = sandbox::SandboxFactory::GetTargetServices();
- } else {
- // Ensure the proper mitigations are enforced for the browser process.
- sandbox::ApplyProcessMitigationsToCurrentProcess(
- sandbox::MITIGATION_DEP |
- sandbox::MITIGATION_DEP_NO_ATL_THUNK);
+
+ if (base::win::GetVersion() < base::win::VERSION_VISTA) {
+ // Enforces strong DEP support. Vista uses the NXCOMPAT flag in the exe.
+ sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED);
}
}
« no previous file with comments | « no previous file | content/common/sandbox_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698