Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: sandbox/win/src/sandbox_types.h

Issue 2191643002: Label sandbox job object OOM as OOM in process termination. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: should not include windows code in platform independent parts Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/app/content_main_runner.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_TYPES_H_ 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
6 #define SANDBOX_WIN_SRC_SANDBOX_TYPES_H_ 6 #define SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
7 7
8 #include "base/process/kill.h"
8 #include "base/process/launch.h" 9 #include "base/process/launch.h"
9 10
10 namespace sandbox { 11 namespace sandbox {
11 12
12 // Operation result codes returned by the sandbox API. 13 // Operation result codes returned by the sandbox API.
13 // 14 //
14 // Note: These codes are listed in a histogram and any new codes should be added 15 // Note: These codes are listed in a histogram and any new codes should be added
15 // at the end. 16 // at the end.
16 // 17 //
17 enum ResultCode : int { 18 enum ResultCode : int {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 SBOX_FATAL_DROPTOKEN = 7007, // Could not lower the token. 115 SBOX_FATAL_DROPTOKEN = 7007, // Could not lower the token.
115 SBOX_FATAL_FLUSHANDLES = 7008, // Failed to flush registry handles. 116 SBOX_FATAL_FLUSHANDLES = 7008, // Failed to flush registry handles.
116 SBOX_FATAL_CACHEDISABLE = 7009, // Failed to forbid HCKU caching. 117 SBOX_FATAL_CACHEDISABLE = 7009, // Failed to forbid HCKU caching.
117 SBOX_FATAL_CLOSEHANDLES = 7010, // Failed to close pending handles. 118 SBOX_FATAL_CLOSEHANDLES = 7010, // Failed to close pending handles.
118 SBOX_FATAL_MITIGATION = 7011, // Could not set the mitigation policy. 119 SBOX_FATAL_MITIGATION = 7011, // Could not set the mitigation policy.
119 SBOX_FATAL_MEMORY_EXCEEDED = 7012, // Exceeded the job memory limit. 120 SBOX_FATAL_MEMORY_EXCEEDED = 7012, // Exceeded the job memory limit.
120 SBOX_FATAL_WARMUP = 7013, // Failed to warmup. 121 SBOX_FATAL_WARMUP = 7013, // Failed to warmup.
121 SBOX_FATAL_LAST 122 SBOX_FATAL_LAST
122 }; 123 };
123 124
125 static_assert(SBOX_FATAL_MEMORY_EXCEEDED ==
126 base::win::kSandboxFatalMemoryExceeded,
127 "Value for SBOX_FATAL_MEMORY_EXCEEDED must match base.");
128
124 class BrokerServices; 129 class BrokerServices;
125 class TargetServices; 130 class TargetServices;
126 131
127 // Contains the pointer to a target or broker service. 132 // Contains the pointer to a target or broker service.
128 struct SandboxInterfaceInfo { 133 struct SandboxInterfaceInfo {
129 BrokerServices* broker_services; 134 BrokerServices* broker_services;
130 TargetServices* target_services; 135 TargetServices* target_services;
131 }; 136 };
132 137
133 #if SANDBOX_EXPORTS 138 #if SANDBOX_EXPORTS
134 #define SANDBOX_INTERCEPT extern "C" __declspec(dllexport) 139 #define SANDBOX_INTERCEPT extern "C" __declspec(dllexport)
135 #else 140 #else
136 #define SANDBOX_INTERCEPT extern "C" 141 #define SANDBOX_INTERCEPT extern "C"
137 #endif 142 #endif
138 143
139 enum InterceptionType { 144 enum InterceptionType {
140 INTERCEPTION_INVALID = 0, 145 INTERCEPTION_INVALID = 0,
141 INTERCEPTION_SERVICE_CALL, // Trampoline of an NT native call 146 INTERCEPTION_SERVICE_CALL, // Trampoline of an NT native call
142 INTERCEPTION_EAT, 147 INTERCEPTION_EAT,
143 INTERCEPTION_SIDESTEP, // Preamble patch 148 INTERCEPTION_SIDESTEP, // Preamble patch
144 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls 149 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls
145 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch) 150 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch)
146 INTERCEPTION_LAST // Placeholder for last item in the enumeration 151 INTERCEPTION_LAST // Placeholder for last item in the enumeration
147 }; 152 };
148 153
149 } // namespace sandbox 154 } // namespace sandbox
150 155
151 #endif // SANDBOX_WIN_SRC_SANDBOX_TYPES_H_ 156 #endif // SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
OLDNEW
« no previous file with comments | « content/app/content_main_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698