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

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

Issue 6483006: Use a struct instead of a union for SandboxInterfaceInfo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « chrome/common/sandbox_init_wrapper_win.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) 2006-2009 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.
11 enum ResultCode { 11 enum ResultCode {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }; 51 };
52 52
53 class TargetServices; 53 class TargetServices;
54 class BrokerServices; 54 class BrokerServices;
55 55
56 // Contains the pointer to a target or broker service. 56 // Contains the pointer to a target or broker service.
57 union SandboxInterfaceInfo { 57 struct SandboxInterfaceInfo {
58 TargetServices* target_services; 58 TargetServices* target_services;
59 BrokerServices* broker_services; 59 BrokerServices* broker_services;
60 }; 60 };
61 61
62 #if SANDBOX_EXPORTS 62 #if SANDBOX_EXPORTS
63 #define SANDBOX_INTERCEPT extern "C" __declspec(dllexport) 63 #define SANDBOX_INTERCEPT extern "C" __declspec(dllexport)
64 #else 64 #else
65 #define SANDBOX_INTERCEPT extern "C" 65 #define SANDBOX_INTERCEPT extern "C"
66 #endif 66 #endif
67 67
68 enum InterceptionType { 68 enum InterceptionType {
69 INTERCEPTION_INVALID = 0, 69 INTERCEPTION_INVALID = 0,
70 INTERCEPTION_SERVICE_CALL, // Trampoline of an NT native call 70 INTERCEPTION_SERVICE_CALL, // Trampoline of an NT native call
71 INTERCEPTION_EAT, 71 INTERCEPTION_EAT,
72 INTERCEPTION_SIDESTEP, // Preamble patch 72 INTERCEPTION_SIDESTEP, // Preamble patch
73 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls 73 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls
74 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch) 74 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch)
75 INTERCEPTION_LAST // Placeholder for last item in the enumeration 75 INTERCEPTION_LAST // Placeholder for last item in the enumeration
76 }; 76 };
77 77
78 } // namespace sandbox 78 } // namespace sandbox
79 79
80 #endif // SANDBOX_SRC_SANDBOX_TYPES_H_ 80 #endif // SANDBOX_SRC_SANDBOX_TYPES_H_
OLDNEW
« no previous file with comments | « chrome/common/sandbox_init_wrapper_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698