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 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 23 matching lines...) Expand all Loading... |
34 // cast if the first base class is Dispatcher. | 34 // cast if the first base class is Dispatcher. |
35 class PolicyBase : public Dispatcher, public TargetPolicy { | 35 class PolicyBase : public Dispatcher, public TargetPolicy { |
36 public: | 36 public: |
37 PolicyBase(); | 37 PolicyBase(); |
38 | 38 |
39 // TargetPolicy: | 39 // TargetPolicy: |
40 virtual void AddRef() OVERRIDE; | 40 virtual void AddRef() OVERRIDE; |
41 virtual void Release() OVERRIDE; | 41 virtual void Release() OVERRIDE; |
42 virtual ResultCode SetTokenLevel(TokenLevel initial, | 42 virtual ResultCode SetTokenLevel(TokenLevel initial, |
43 TokenLevel lockdown) OVERRIDE; | 43 TokenLevel lockdown) OVERRIDE; |
| 44 virtual TokenLevel GetInitialTokenLevel() const OVERRIDE; |
| 45 virtual TokenLevel GetLockdownTokenLevel() const OVERRIDE; |
44 virtual ResultCode SetJobLevel(JobLevel job_level, | 46 virtual ResultCode SetJobLevel(JobLevel job_level, |
45 uint32 ui_exceptions) OVERRIDE; | 47 uint32 ui_exceptions) OVERRIDE; |
46 virtual ResultCode SetAlternateDesktop(bool alternate_winstation) OVERRIDE; | 48 virtual ResultCode SetAlternateDesktop(bool alternate_winstation) OVERRIDE; |
47 virtual base::string16 GetAlternateDesktop() const OVERRIDE; | 49 virtual base::string16 GetAlternateDesktop() const OVERRIDE; |
48 virtual ResultCode CreateAlternateDesktop(bool alternate_winstation) OVERRIDE; | 50 virtual ResultCode CreateAlternateDesktop(bool alternate_winstation) OVERRIDE; |
49 virtual void DestroyAlternateDesktop() OVERRIDE; | 51 virtual void DestroyAlternateDesktop() OVERRIDE; |
50 virtual ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) OVERRIDE; | 52 virtual ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) OVERRIDE; |
| 53 virtual IntegrityLevel GetIntegrityLevel() const OVERRIDE; |
51 virtual ResultCode SetDelayedIntegrityLevel( | 54 virtual ResultCode SetDelayedIntegrityLevel( |
52 IntegrityLevel integrity_level) OVERRIDE; | 55 IntegrityLevel integrity_level) OVERRIDE; |
53 virtual ResultCode SetAppContainer(const wchar_t* sid) OVERRIDE; | 56 virtual ResultCode SetAppContainer(const wchar_t* sid) OVERRIDE; |
54 virtual ResultCode SetCapability(const wchar_t* sid) OVERRIDE; | 57 virtual ResultCode SetCapability(const wchar_t* sid) OVERRIDE; |
55 virtual ResultCode SetProcessMitigations(MitigationFlags flags) OVERRIDE; | 58 virtual ResultCode SetProcessMitigations(MitigationFlags flags) OVERRIDE; |
56 virtual MitigationFlags GetProcessMitigations() OVERRIDE; | 59 virtual MitigationFlags GetProcessMitigations() OVERRIDE; |
57 virtual ResultCode SetDelayedProcessMitigations( | 60 virtual ResultCode SetDelayedProcessMitigations( |
58 MitigationFlags flags) OVERRIDE; | 61 MitigationFlags flags) OVERRIDE; |
59 virtual MitigationFlags GetDelayedProcessMitigations() OVERRIDE; | 62 virtual MitigationFlags GetDelayedProcessMitigations() const OVERRIDE; |
60 virtual void SetStrictInterceptions() OVERRIDE; | 63 virtual void SetStrictInterceptions() OVERRIDE; |
61 virtual ResultCode SetStdoutHandle(HANDLE handle) OVERRIDE; | 64 virtual ResultCode SetStdoutHandle(HANDLE handle) OVERRIDE; |
62 virtual ResultCode SetStderrHandle(HANDLE handle) OVERRIDE; | 65 virtual ResultCode SetStderrHandle(HANDLE handle) OVERRIDE; |
63 virtual ResultCode AddRule(SubSystem subsystem, Semantics semantics, | 66 virtual ResultCode AddRule(SubSystem subsystem, Semantics semantics, |
64 const wchar_t* pattern) OVERRIDE; | 67 const wchar_t* pattern) OVERRIDE; |
65 virtual ResultCode AddDllToUnload(const wchar_t* dll_name); | 68 virtual ResultCode AddDllToUnload(const wchar_t* dll_name); |
66 virtual ResultCode AddKernelObjectToClose( | 69 virtual ResultCode AddKernelObjectToClose( |
67 const base::char16* handle_type, | 70 const base::char16* handle_type, |
68 const base::char16* handle_name) OVERRIDE; | 71 const base::char16* handle_name) OVERRIDE; |
69 | 72 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 155 |
153 static HDESK alternate_desktop_handle_; | 156 static HDESK alternate_desktop_handle_; |
154 static HWINSTA alternate_winstation_handle_; | 157 static HWINSTA alternate_winstation_handle_; |
155 | 158 |
156 DISALLOW_COPY_AND_ASSIGN(PolicyBase); | 159 DISALLOW_COPY_AND_ASSIGN(PolicyBase); |
157 }; | 160 }; |
158 | 161 |
159 } // namespace sandbox | 162 } // namespace sandbox |
160 | 163 |
161 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ | 164 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_BASE_H_ |
OLD | NEW |