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

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

Issue 10689170: Move the Windows sandbox to sandbox/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of tree (properly this time) Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « sandbox/src/sandbox_policy_base.cc ('k') | sandbox/src/sandbox_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SANDBOX_SRC_SANDBOX_TYPES_H_
6 #define SANDBOX_SRC_SANDBOX_TYPES_H_
7
8 namespace sandbox {
9
10 // Operation result codes returned by the sandbox API.
11 enum ResultCode {
12 SBOX_ALL_OK = 0,
13 // Error is originating on the win32 layer. Call GetlastError() for more
14 // information.
15 SBOX_ERROR_GENERIC = 1,
16 // An invalid combination of parameters was given to the API.
17 SBOX_ERROR_BAD_PARAMS = 2,
18 // The desired operation is not supported at this time.
19 SBOX_ERROR_UNSUPPORTED = 3,
20 // The request requires more memory that allocated or available.
21 SBOX_ERROR_NO_SPACE = 4,
22 // The ipc service requested does not exist.
23 SBOX_ERROR_INVALID_IPC = 5,
24 // The ipc service did not complete.
25 SBOX_ERROR_FAILED_IPC = 6,
26 // The requested handle was not found.
27 SBOX_ERROR_NO_HANDLE = 7,
28 // This function was not expected to be called at this time.
29 SBOX_ERROR_UNEXPECTED_CALL = 8,
30 // WaitForAllTargets is already called.
31 SBOX_ERROR_WAIT_ALREADY_CALLED = 9,
32 // A channel error prevented DoCall from executing.
33 SBOX_ERROR_CHANNEL_ERROR = 10,
34 // Failed to create the alternate desktop.
35 SBOX_ERROR_CANNOT_CREATE_DESKTOP = 11,
36 // Failed to create the alternate window station.
37 SBOX_ERROR_CANNOT_CREATE_WINSTATION = 12,
38 // Failed to switch back to the interactive window station.
39 SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION = 13,
40 // Placeholder for last item of the enum.
41 SBOX_ERROR_LAST
42 };
43
44 // If the sandbox cannot create a secure environment for the target, the
45 // target will be forcibly terminated. These are the process exit codes.
46 enum TerminationCodes {
47 SBOX_FATAL_INTEGRITY = 7006, // Could not set the integrity level.
48 SBOX_FATAL_DROPTOKEN = 7007, // Could not lower the token.
49 SBOX_FATAL_FLUSHANDLES = 7008, // Failed to flush registry handles.
50 SBOX_FATAL_CACHEDISABLE = 7009, // Failed to forbid HCKU caching.
51 SBOX_FATAL_CLOSEHANDLES = 7010 // Failed to close pending handles.
52 };
53
54 class BrokerServices;
55 class TargetServices;
56
57 // Contains the pointer to a target or broker service.
58 struct SandboxInterfaceInfo {
59 BrokerServices* broker_services;
60 TargetServices* target_services;
61 };
62
63 #if SANDBOX_EXPORTS
64 #define SANDBOX_INTERCEPT extern "C" __declspec(dllexport)
65 #else
66 #define SANDBOX_INTERCEPT extern "C"
67 #endif
68
69 enum InterceptionType {
70 INTERCEPTION_INVALID = 0,
71 INTERCEPTION_SERVICE_CALL, // Trampoline of an NT native call
72 INTERCEPTION_EAT,
73 INTERCEPTION_SIDESTEP, // Preamble patch
74 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls
75 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch)
76 INTERCEPTION_LAST // Placeholder for last item in the enumeration
77 };
78
79 } // namespace sandbox
80
81 #endif // SANDBOX_SRC_SANDBOX_TYPES_H_
OLDNEW
« no previous file with comments | « sandbox/src/sandbox_policy_base.cc ('k') | sandbox/src/sandbox_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698