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

Unified Diff: sandbox/win/src/sandbox_types.h

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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..e85a2edae4c2a21215c6ac58bdc0a5886e0cadc0 100644
--- a/sandbox/win/src/sandbox_types.h
+++ b/sandbox/win/src/sandbox_types.h
@@ -5,48 +5,86 @@
#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.
+//
+// Note: These codes are listed in a histogram and any new codes should be added
+// at the end.
+//
enum ResultCode {
SBOX_ALL_OK = 0,
// Error is originating on the win32 layer. Call GetlastError() for more
// information.
- SBOX_ERROR_GENERIC = 1,
+ SBOX_ERROR_GENERIC,
// An invalid combination of parameters was given to the API.
- SBOX_ERROR_BAD_PARAMS = 2,
+ SBOX_ERROR_BAD_PARAMS = 1000,
// The desired operation is not supported at this time.
- SBOX_ERROR_UNSUPPORTED = 3,
+ SBOX_ERROR_UNSUPPORTED,
// The request requires more memory that allocated or available.
- SBOX_ERROR_NO_SPACE = 4,
+ SBOX_ERROR_NO_SPACE,
// The ipc service requested does not exist.
- SBOX_ERROR_INVALID_IPC = 5,
+ SBOX_ERROR_INVALID_IPC,
// The ipc service did not complete.
- SBOX_ERROR_FAILED_IPC = 6,
+ SBOX_ERROR_FAILED_IPC,
// The requested handle was not found.
- SBOX_ERROR_NO_HANDLE = 7,
+ SBOX_ERROR_NO_HANDLE,
// This function was not expected to be called at this time.
- SBOX_ERROR_UNEXPECTED_CALL = 8,
+ SBOX_ERROR_UNEXPECTED_CALL,
// WaitForAllTargets is already called.
- SBOX_ERROR_WAIT_ALREADY_CALLED = 9,
+ SBOX_ERROR_WAIT_ALREADY_CALLED,
// A channel error prevented DoCall from executing.
- SBOX_ERROR_CHANNEL_ERROR = 10,
+ SBOX_ERROR_CHANNEL_ERROR,
// Failed to create the alternate desktop.
- SBOX_ERROR_CANNOT_CREATE_DESKTOP = 11,
+ SBOX_ERROR_CANNOT_CREATE_DESKTOP,
// Failed to create the alternate window station.
- SBOX_ERROR_CANNOT_CREATE_WINSTATION = 12,
+ SBOX_ERROR_CANNOT_CREATE_WINSTATION,
// Failed to switch back to the interactive window station.
- SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION = 13,
+ SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION,
// The supplied AppContainer is not valid.
- SBOX_ERROR_INVALID_APP_CONTAINER = 14,
+ SBOX_ERROR_INVALID_APP_CONTAINER,
// The supplied capability is not valid.
- SBOX_ERROR_INVALID_CAPABILITY = 15,
+ SBOX_ERROR_INVALID_CAPABILITY,
// There is a failure initializing the AppContainer.
- SBOX_ERROR_CANNOT_INIT_APPCONTAINER = 16,
+ SBOX_ERROR_CANNOT_INIT_APPCONTAINER,
// Initializing or updating ProcThreadAttributes failed.
- SBOX_ERROR_PROC_THREAD_ATTRIBUTES = 17,
+ SBOX_ERROR_PROC_THREAD_ATTRIBUTES,
// Error in creating process.
- SBOX_ERROR_CREATE_PROCESS = 18,
+ SBOX_ERROR_CREATE_PROCESS,
+ // Failure calling delegate PreSpawnTarget.
+ SBOX_ERROR_DELEGATE_PRE_SPAWN,
+ // Could not assign process to job object.
+ SBOX_ERROR_ASSIGN_PROCESS_TO_JOB_OBJECT,
+ // Could not assign process to job object.
+ SBOX_ERROR_SET_THREAD_TOKEN,
+ // Could not get thread context of new process.
+ SBOX_ERROR_GET_THREAD_CONTEXT,
+ // Could not duplicate target info of new process.
+ SBOX_ERROR_DUPLICATE_TARGET_INFO,
+ // Could not set low box token.
+ SBOX_ERROR_SET_LOW_BOX_TOKEN,
+ // Could not create file mapping for IPC dispatcher.
+ SBOX_ERROR_CREATE_FILE_MAPPING,
+ // Could not duplicate shared section into target process for IPC dispatcher.
+ SBOX_ERROR_DUPLICATE_SHARED_SECTION,
+ // Could not map view of shared memory in broker.
+ SBOX_ERROR_MAP_VIEW_OF_SHARED_SECTION,
+ // Could not apply ASLR mitigations to target process.
+ SBOX_ERROR_APPLY_ASLR_MITIGATIONS,
+ // Could not setup one of the required interception services.
+ SBOX_ERROR_SETUP_BASIC_INTERCEPTIONS,
+ // Could not setup basic interceptions.
+ SBOX_ERROR_SETUP_INTERCEPTION_SERVICE,
+ // 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,
+ // Could not setup the imports for ntdll in target process.
+ SBOX_ERROR_SETUP_NTDLL_IMPORTS,
+ // Could not setup the handle closer in target process.
+ SBOX_ERROR_SETUP_HANDLE_CLOSER,
// Placeholder for last item of the enum.
SBOX_ERROR_LAST
};

Powered by Google App Engine
This is Rietveld 408576698