OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/public/app/sandbox_helper_win.h" | 5 #include "content/public/app/sandbox_helper_win.h" |
6 | 6 |
7 #include "sandbox/win/src/process_mitigations.h" | 7 #include "sandbox/win/src/process_mitigations.h" |
8 #include "sandbox/win/src/sandbox_factory.h" | 8 #include "sandbox/win/src/sandbox_factory.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 void InitializeSandboxInfo(sandbox::SandboxInterfaceInfo* info) { | 12 void InitializeSandboxInfo(sandbox::SandboxInterfaceInfo* info) { |
13 info->broker_services = sandbox::SandboxFactory::GetBrokerServices(); | 13 info->broker_services = sandbox::SandboxFactory::GetBrokerServices(); |
14 if (!info->broker_services) { | 14 if (!info->broker_services) { |
15 info->target_services = sandbox::SandboxFactory::GetTargetServices(); | 15 info->target_services = sandbox::SandboxFactory::GetTargetServices(); |
16 } else { | 16 } else { |
17 // Ensure the proper mitigations are enforced for the browser process. | 17 // Ensure the proper mitigations are enforced for the browser process. |
18 sandbox::ApplyProcessMitigationsToCurrentProcess( | 18 sandbox::ApplyProcessMitigationsToCurrentProcess( |
19 sandbox::MITIGATION_DEP | | 19 sandbox::MITIGATION_DEP | |
20 sandbox::MITIGATION_DEP_NO_ATL_THUNK | | 20 sandbox::MITIGATION_DEP_NO_ATL_THUNK | |
21 sandbox::MITIGATION_HARDEN_TOKEN_IL_POLICY); | 21 sandbox::MITIGATION_HARDEN_TOKEN_IL_POLICY); |
| 22 // Note: these mitigations are "post-startup". Some mitigations that need |
| 23 // to be enabled sooner (e.g. MITIGATION_EXTENSION_POINT_DISABLE) are done |
| 24 // so in Chrome_ELF. |
22 } | 25 } |
23 } | 26 } |
24 | 27 |
25 } // namespace content | 28 } // namespace content |
OLD | NEW |