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

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

Issue 8414020: Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2006-2011 The Chromium Authors. All rights reserved. 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 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_SRC_SANDBOX_TYPES_H_ 5 #ifndef SANDBOX_SRC_SANDBOX_TYPES_H_
6 #define SANDBOX_SRC_SANDBOX_TYPES_H_ 6 #define SANDBOX_SRC_SANDBOX_TYPES_H_
7 7
8 namespace sandbox { 8 namespace sandbox {
9 9
10 // Operation result codes returned by the sandbox API. 10 // Operation result codes returned by the sandbox API.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // If the sandbox cannot create a secure environment for the target, the 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. 45 // target will be forcibly terminated. These are the process exit codes.
46 enum TerminationCodes { 46 enum TerminationCodes {
47 SBOX_FATAL_INTEGRITY = 7006, // Could not set the integrity level. 47 SBOX_FATAL_INTEGRITY = 7006, // Could not set the integrity level.
48 SBOX_FATAL_DROPTOKEN = 7007, // Could not lower the token. 48 SBOX_FATAL_DROPTOKEN = 7007, // Could not lower the token.
49 SBOX_FATAL_FLUSHANDLES = 7008, // Failed to flush registry handles. 49 SBOX_FATAL_FLUSHANDLES = 7008, // Failed to flush registry handles.
50 SBOX_FATAL_CACHEDISABLE = 7009, // Failed to forbid HCKU caching. 50 SBOX_FATAL_CACHEDISABLE = 7009, // Failed to forbid HCKU caching.
51 SBOX_FATAL_CLOSEHANDLES = 7010 // Failed to close pending handles. 51 SBOX_FATAL_CLOSEHANDLES = 7010 // Failed to close pending handles.
52 }; 52 };
53 53
54 class BrokerServices;
54 class TargetServices; 55 class TargetServices;
55 class BrokerServices;
56 56
57 // Contains the pointer to a target or broker service. Older code used 57 // Contains the pointer to a target or broker service.
58 // a union so the |legacy| member is there for us to detect we are
59 // being passed a SandboxInterfaceInfo by old code. If legacy is not
60 // null it means we are dealing with old code a must copy this value
61 // into both |broker_services| and |target_services|.
62 struct SandboxInterfaceInfo { 58 struct SandboxInterfaceInfo {
63 void* legacy;
cpu_(ooo_6.6-7.5) 2011/10/29 01:35:39 I already talked to John about this. I agree we ne
64 BrokerServices* broker_services; 59 BrokerServices* broker_services;
65 TargetServices* target_services; 60 TargetServices* target_services;
66 }; 61 };
67 62
68 #if SANDBOX_EXPORTS 63 #if SANDBOX_EXPORTS
69 #define SANDBOX_INTERCEPT extern "C" __declspec(dllexport) 64 #define SANDBOX_INTERCEPT extern "C" __declspec(dllexport)
70 #else 65 #else
71 #define SANDBOX_INTERCEPT extern "C" 66 #define SANDBOX_INTERCEPT extern "C"
72 #endif 67 #endif
73 68
74 enum InterceptionType { 69 enum InterceptionType {
75 INTERCEPTION_INVALID = 0, 70 INTERCEPTION_INVALID = 0,
76 INTERCEPTION_SERVICE_CALL, // Trampoline of an NT native call 71 INTERCEPTION_SERVICE_CALL, // Trampoline of an NT native call
77 INTERCEPTION_EAT, 72 INTERCEPTION_EAT,
78 INTERCEPTION_SIDESTEP, // Preamble patch 73 INTERCEPTION_SIDESTEP, // Preamble patch
79 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls 74 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls
80 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch) 75 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch)
81 INTERCEPTION_LAST // Placeholder for last item in the enumeration 76 INTERCEPTION_LAST // Placeholder for last item in the enumeration
82 }; 77 };
83 78
84 } // namespace sandbox 79 } // namespace sandbox
85 80
86 #endif // SANDBOX_SRC_SANDBOX_TYPES_H_ 81 #endif // SANDBOX_SRC_SANDBOX_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698