Chromium Code Reviews| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 // | 115 // |
| 116 // Return value: SBOX_ALL_OK if the setting succeeds and false otherwise. | 116 // Return value: SBOX_ALL_OK if the setting succeeds and false otherwise. |
| 117 // | 117 // |
| 118 // Note: JOB_OBJECT_XXXX constants are defined in winnt.h and documented at | 118 // Note: JOB_OBJECT_XXXX constants are defined in winnt.h and documented at |
| 119 // length in: | 119 // length in: |
| 120 // http://msdn2.microsoft.com/en-us/library/ms684152.aspx | 120 // http://msdn2.microsoft.com/en-us/library/ms684152.aspx |
| 121 // | 121 // |
| 122 // Note: the recommended level is JOB_RESTRICTED or JOB_LOCKDOWN. | 122 // Note: the recommended level is JOB_RESTRICTED or JOB_LOCKDOWN. |
| 123 virtual ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) = 0; | 123 virtual ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) = 0; |
| 124 | 124 |
| 125 // Sets a hard limit on the size of the commit set for the sandboxed process. | |
| 126 // If terminate is false, the allocation will fail when the limit is reached. | |
| 127 // If true, the process will terminate with SBOX_FATAL_MEMORY_EXCEEDED (7012) | |
| 128 // when the limit is reached. | |
|
cpu_(ooo_6.6-7.5)
2014/06/06 19:44:05
Not understanding this API. Say I have mapped a me
jschuh
2014/06/06 20:13:14
No, it's commit charge, which is the largest amoun
| |
| 129 virtual ResultCode SetJobMemoryLimit(size_t limit, bool terminate) = 0; | |
| 130 | |
| 131 // Returns whether the sandbox is set to terminate the process on hitting the | |
| 132 // memory limit imposed by the job object. | |
| 133 virtual bool WillTerminateOnJobMemoryLimit() const = 0; | |
| 134 | |
| 125 // Specifies the desktop on which the application is going to run. If the | 135 // Specifies the desktop on which the application is going to run. If the |
| 126 // desktop does not exist, it will be created. If alternate_winstation is | 136 // desktop does not exist, it will be created. If alternate_winstation is |
| 127 // set to true, the desktop will be created on an alternate window station. | 137 // set to true, the desktop will be created on an alternate window station. |
| 128 virtual ResultCode SetAlternateDesktop(bool alternate_winstation) = 0; | 138 virtual ResultCode SetAlternateDesktop(bool alternate_winstation) = 0; |
| 129 | 139 |
| 130 // Returns the name of the alternate desktop used. If an alternate window | 140 // Returns the name of the alternate desktop used. If an alternate window |
| 131 // station is specified, the name is prepended by the window station name, | 141 // station is specified, the name is prepended by the window station name, |
| 132 // followed by a backslash. | 142 // followed by a backslash. |
| 133 virtual base::string16 GetAlternateDesktop() const = 0; | 143 virtual base::string16 GetAlternateDesktop() const = 0; |
| 134 | 144 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 // A NULL value for handle_name indicates all handles of the specified type. | 229 // A NULL value for handle_name indicates all handles of the specified type. |
| 220 // An empty string for handle_name indicates the handle is unnamed. | 230 // An empty string for handle_name indicates the handle is unnamed. |
| 221 virtual ResultCode AddKernelObjectToClose(const wchar_t* handle_type, | 231 virtual ResultCode AddKernelObjectToClose(const wchar_t* handle_type, |
| 222 const wchar_t* handle_name) = 0; | 232 const wchar_t* handle_name) = 0; |
| 223 }; | 233 }; |
| 224 | 234 |
| 225 } // namespace sandbox | 235 } // namespace sandbox |
| 226 | 236 |
| 227 | 237 |
| 228 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ | 238 #endif // SANDBOX_WIN_SRC_SANDBOX_POLICY_H_ |
| OLD | NEW |