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 SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ | 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ |
6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ | 6 #define SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // | 121 // |
122 // Return value: SBOX_ALL_OK if the setting succeeds and false otherwise. | 122 // Return value: SBOX_ALL_OK if the setting succeeds and false otherwise. |
123 // | 123 // |
124 // Note: JOB_OBJECT_XXXX constants are defined in winnt.h and documented at | 124 // Note: JOB_OBJECT_XXXX constants are defined in winnt.h and documented at |
125 // length in: | 125 // length in: |
126 // http://msdn2.microsoft.com/en-us/library/ms684152.aspx | 126 // http://msdn2.microsoft.com/en-us/library/ms684152.aspx |
127 // | 127 // |
128 // Note: the recommended level is JOB_RESTRICTED or JOB_LOCKDOWN. | 128 // Note: the recommended level is JOB_RESTRICTED or JOB_LOCKDOWN. |
129 virtual ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) = 0; | 129 virtual ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) = 0; |
130 | 130 |
| 131 // Sets a hard limit on the size of the commit set for the sandboxed process. |
| 132 // If the limit is reached, the process will be terminated with |
| 133 // SBOX_FATAL_MEMORY_EXCEEDED (7012). |
| 134 virtual ResultCode SetJobMemoryLimit(size_t memory_limit) = 0; |
| 135 |
131 // Specifies the desktop on which the application is going to run. If the | 136 // Specifies the desktop on which the application is going to run. If the |
132 // desktop does not exist, it will be created. If alternate_winstation is | 137 // desktop does not exist, it will be created. If alternate_winstation is |
133 // set to true, the desktop will be created on an alternate window station. | 138 // set to true, the desktop will be created on an alternate window station. |
134 virtual ResultCode SetAlternateDesktop(bool alternate_winstation) = 0; | 139 virtual ResultCode SetAlternateDesktop(bool alternate_winstation) = 0; |
135 | 140 |
136 // Returns the name of the alternate desktop used. If an alternate window | 141 // Returns the name of the alternate desktop used. If an alternate window |
137 // station is specified, the name is prepended by the window station name, | 142 // station is specified, the name is prepended by the window station name, |
138 // followed by a backslash. | 143 // followed by a backslash. |
139 virtual base::string16 GetAlternateDesktop() const = 0; | 144 virtual base::string16 GetAlternateDesktop() const = 0; |
140 | 145 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // A NULL value for handle_name indicates all handles of the specified type. | 233 // A NULL value for handle_name indicates all handles of the specified type. |
229 // An empty string for handle_name indicates the handle is unnamed. | 234 // An empty string for handle_name indicates the handle is unnamed. |
230 virtual ResultCode AddKernelObjectToClose(const wchar_t* handle_type, | 235 virtual ResultCode AddKernelObjectToClose(const wchar_t* handle_type, |
231 const wchar_t* handle_name) = 0; | 236 const wchar_t* handle_name) = 0; |
232 }; | 237 }; |
233 | 238 |
234 } // namespace sandbox | 239 } // namespace sandbox |
235 | 240 |
236 | 241 |
237 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ | 242 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ |
OLD | NEW |