| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_COMMON_SANDBOX_WIN_H_ | 5 #ifndef CONTENT_COMMON_SANDBOX_WIN_H_ |
| 6 #define CONTENT_COMMON_SANDBOX_WIN_H_ | 6 #define CONTENT_COMMON_SANDBOX_WIN_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "sandbox/win/src/sandbox_types.h" | 11 #include "sandbox/win/src/sandbox_types.h" |
| 12 #include "sandbox/win/src/security_level.h" | 12 #include "sandbox/win/src/security_level.h" |
| 13 | 13 |
| 14 namespace base { | |
| 15 class CommandLine; | |
| 16 } | |
| 17 | |
| 18 namespace sandbox { | 14 namespace sandbox { |
| 19 class BrokerServices; | 15 class BrokerServices; |
| 20 class TargetPolicy; | 16 class TargetPolicy; |
| 21 class TargetServices; | 17 class TargetServices; |
| 22 } | 18 } |
| 23 | 19 |
| 24 namespace content { | 20 namespace content { |
| 25 | 21 |
| 26 // Wrapper around sandbox::TargetPolicy::SetJobLevel that checks if the sandbox | 22 // Wrapper around sandbox::TargetPolicy::SetJobLevel that checks if the sandbox |
| 27 // should be let to run without a job object assigned. | 23 // should be let to run without a job object assigned. |
| 28 sandbox::ResultCode SetJobLevel(const base::CommandLine& cmd_line, | 24 sandbox::ResultCode SetJobLevel(sandbox::JobLevel job_level, |
| 29 sandbox::JobLevel job_level, | |
| 30 uint32_t ui_exceptions, | 25 uint32_t ui_exceptions, |
| 31 sandbox::TargetPolicy* policy); | 26 sandbox::TargetPolicy* policy); |
| 32 | 27 |
| 33 // Closes handles that are opened at process creation and initialization. | 28 // Closes handles that are opened at process creation and initialization. |
| 34 sandbox::ResultCode AddBaseHandleClosePolicy(sandbox::TargetPolicy* policy); | 29 sandbox::ResultCode AddBaseHandleClosePolicy(sandbox::TargetPolicy* policy); |
| 35 | 30 |
| 36 // Add AppContainer policy for |sid| on supported OS. | 31 // Add AppContainer policy for |sid| on supported OS. |
| 37 sandbox::ResultCode AddAppContainerPolicy(sandbox::TargetPolicy* policy, | 32 sandbox::ResultCode AddAppContainerPolicy(sandbox::TargetPolicy* policy, |
| 38 const wchar_t* sid); | 33 const wchar_t* sid); |
| 39 | 34 |
| 40 // Add the win32k lockdown policy on supported OS. | 35 // Add the win32k lockdown policy on supported OS. |
| 41 sandbox::ResultCode AddWin32kLockdownPolicy(sandbox::TargetPolicy* policy, | 36 sandbox::ResultCode AddWin32kLockdownPolicy(sandbox::TargetPolicy* policy, |
| 42 bool enable_opm); | 37 bool enable_opm); |
| 43 | 38 |
| 44 bool InitBrokerServices(sandbox::BrokerServices* broker_services); | 39 bool InitBrokerServices(sandbox::BrokerServices* broker_services); |
| 45 | 40 |
| 46 bool InitTargetServices(sandbox::TargetServices* target_services); | 41 bool InitTargetServices(sandbox::TargetServices* target_services); |
| 47 | 42 |
| 48 } // namespace content | 43 } // namespace content |
| 49 | 44 |
| 50 #endif // CONTENT_COMMON_SANDBOX_WIN_H_ | 45 #endif // CONTENT_COMMON_SANDBOX_WIN_H_ |
| OLD | NEW |