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