Index: sandbox/win/src/sandbox_types.h |
diff --git a/sandbox/win/src/sandbox_types.h b/sandbox/win/src/sandbox_types.h |
index b749b9ca5189b6c2319d35b19045da576097e2d2..2a9511948d08cc18842a8e04ffb7ae1b193f432b 100644 |
--- a/sandbox/win/src/sandbox_types.h |
+++ b/sandbox/win/src/sandbox_types.h |
@@ -5,10 +5,16 @@ |
#ifndef SANDBOX_WIN_SRC_SANDBOX_TYPES_H_ |
#define SANDBOX_WIN_SRC_SANDBOX_TYPES_H_ |
+#include "base/process/launch.h" |
+ |
namespace sandbox { |
// Operation result codes returned by the sandbox API. |
-enum ResultCode { |
+// |
+// Note: These codes are listed in a histogram and any new codes should be added |
+// at the end. |
+// |
+enum ResultCode : int { |
SBOX_ALL_OK = 0, |
// Error is originating on the win32 layer. Call GetlastError() for more |
// information. |
@@ -47,6 +53,38 @@ enum ResultCode { |
SBOX_ERROR_PROC_THREAD_ATTRIBUTES = 17, |
// Error in creating process. |
SBOX_ERROR_CREATE_PROCESS = 18, |
+ // Failure calling delegate PreSpawnTarget. |
+ SBOX_ERROR_DELEGATE_PRE_SPAWN = 19, |
+ // Could not assign process to job object. |
+ SBOX_ERROR_ASSIGN_PROCESS_TO_JOB_OBJECT = 20, |
+ // Could not assign process to job object. |
+ SBOX_ERROR_SET_THREAD_TOKEN = 21, |
+ // Could not get thread context of new process. |
+ SBOX_ERROR_GET_THREAD_CONTEXT = 22, |
+ // Could not duplicate target info of new process. |
+ SBOX_ERROR_DUPLICATE_TARGET_INFO = 23, |
+ // Could not set low box token. |
+ SBOX_ERROR_SET_LOW_BOX_TOKEN = 24, |
+ // Could not create file mapping for IPC dispatcher. |
+ SBOX_ERROR_CREATE_FILE_MAPPING = 25, |
+ // Could not duplicate shared section into target process for IPC dispatcher. |
+ SBOX_ERROR_DUPLICATE_SHARED_SECTION = 26, |
+ // Could not map view of shared memory in broker. |
+ SBOX_ERROR_MAP_VIEW_OF_SHARED_SECTION = 27, |
+ // Could not apply ASLR mitigations to target process. |
+ SBOX_ERROR_APPLY_ASLR_MITIGATIONS = 28, |
+ // Could not setup one of the required interception services. |
+ SBOX_ERROR_SETUP_BASIC_INTERCEPTIONS = 29, |
+ // Could not setup basic interceptions. |
+ SBOX_ERROR_SETUP_INTERCEPTION_SERVICE = 30, |
+ // Could not initialize interceptions. This usually means 3rd party software |
+ // is stomping on our hooks, or can sometimes mean the syscall format has |
+ // changed. |
+ SBOX_ERROR_INITIALIZE_INTERCEPTIONS = 31, |
+ // Could not setup the imports for ntdll in target process. |
+ SBOX_ERROR_SETUP_NTDLL_IMPORTS = 32, |
+ // Could not setup the handle closer in target process. |
+ SBOX_ERROR_SETUP_HANDLE_CLOSER = 33, |
// Placeholder for last item of the enum. |
SBOX_ERROR_LAST |
}; |