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 3 // found in the LICENSE file. 4 5 #include "content/public/app/sandbox_helper_win.h" 6 7 #include "sandbox/win/src/process_mitigations.h" 8 #include "sandbox/win/src/sandbox_factory.h" 9 10 namespace content { 11 InitializeSandboxInfo(sandbox::SandboxInterfaceInfo * info)12void InitializeSandboxInfo(sandbox::SandboxInterfaceInfo* info) { 13 info->broker_services = sandbox::SandboxFactory::GetBrokerServices(); 14 if (!info->broker_services) { 15 info->target_services = sandbox::SandboxFactory::GetTargetServices(); 16 } else { 17 // Ensure the proper mitigations are enforced for the browser process. 18 sandbox::ApplyProcessMitigationsToCurrentProcess( 19 sandbox::MITIGATION_DEP | sandbox::MITIGATION_DEP_NO_ATL_THUNK | 20 sandbox::MITIGATION_HARDEN_TOKEN_IL_POLICY); 21 // Note: these mitigations are "post-startup". Some mitigations that need 22 // to be enabled sooner (e.g. MITIGATION_EXTENSION_POINT_DISABLE) are done 23 // so in Chrome_ELF. 24 } 25 } 26 27 } // namespace content 28