Index: content/browser/child_process_launcher.h |
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h |
index 710247778bbfb56b16e971fd2f69d7e21c40375e..edb1761893460bd8c286dabb70adf56f88dc5787 100644 |
--- a/content/browser/child_process_launcher.h |
+++ b/content/browser/child_process_launcher.h |
@@ -24,6 +24,19 @@ class CommandLine; |
namespace content { |
+// Platform neutral result codes for process launches. |
+// Each platform can optionally define its own specific set of error codes. |
+// For Windows, these are sandbox::ResultCode starting at offset 1000 located in |
jam
2016/04/28 15:41:14
normally this is done by having the lower layer se
Will Harris
2016/05/02 16:45:23
I now start the enum in the lower layer, and then
|
+// sandbox/win/src/sandbox_types.h |
+enum LaunchResultCode { |
+ // Launch success. |
+ LAUNCH_RESULT_SUCCESS = 0, |
+ // Generic launch failure. |
+ LAUNCH_RESULT_FAILURE, |
+ // Placeholder for last item of the enum. |
+ LAUNCH_RESULT_CODE_LAST_CODE |
+}; |
+ |
// Launches a process asynchronously and notifies the client of the process |
// handle when it's available. It's used to avoid blocking the calling thread |
// on the OS since often it can take > 100 ms to create the process. |
@@ -35,7 +48,7 @@ class CONTENT_EXPORT ChildProcessLauncher : public base::NonThreadSafe { |
// constructed on. |
virtual void OnProcessLaunched() = 0; |
- virtual void OnProcessLaunchFailed() {}; |
+ virtual void OnProcessLaunchFailed(int error_code) {}; |
protected: |
virtual ~Client() {} |
@@ -101,14 +114,16 @@ class CONTENT_EXPORT ChildProcessLauncher : public base::NonThreadSafe { |
base::ScopedFD ipcfd, |
base::ScopedFD mojo_fd, |
#endif |
- base::Process process); |
+ base::Process process, |
+ int error_code); |
// Notifies the client about the result of the operation. |
void Notify(ZygoteHandle zygote, |
#if defined(OS_ANDROID) |
base::ScopedFD ipcfd, |
#endif |
- base::Process process); |
+ base::Process process, |
+ int error_code); |
#if defined(MOJO_SHELL_CLIENT) |
// When this process is run from an external Mojo shell, this function will |