OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_COMMON_RESULT_CODES_H_ | 5 #ifndef CHROME_COMMON_RESULT_CODES_H_ |
6 #define CHROME_COMMON_RESULT_CODES_H_ | 6 #define CHROME_COMMON_RESULT_CODES_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 | 10 |
11 // This file consolidates all the return codes for the browser and renderer | 11 // This file consolidates all the return codes for the browser and renderer |
12 // process. The return code is the value that: | 12 // process. The return code is the value that: |
13 // a) is returned by main() or winmain(), or | 13 // a) is returned by main() or winmain(), or |
14 // b) specified in the call for ExitProcess() or TerminateProcess(), or | 14 // b) specified in the call for ExitProcess() or TerminateProcess(), or |
15 // c) the exception value that causes a process to terminate. | 15 // c) the exception value that causes a process to terminate. |
16 // | 16 // |
17 // It is advisable to not use negative numbers because the Windows API returns | 17 // It is advisable to not use negative numbers because the Windows API returns |
18 // it as an unsigned long and the exception values have high numbers. For | 18 // it as an unsigned long and the exception values have high numbers. For |
19 // example EXCEPTION_ACCESS_VIOLATION value is 0xC0000005. | 19 // example EXCEPTION_ACCESS_VIOLATION value is 0xC0000005. |
20 | 20 |
21 class ResultCodes { | 21 class ResultCodes { |
22 public: | 22 public: |
23 enum ExitCode { | 23 enum ExitCode { |
24 NORMAL_EXIT = base::PROCESS_END_NORMAL_TERMINATION, | 24 NORMAL_EXIT = 0, // Process terminated normally. |
25 TASKMAN_KILL = base::PROCESS_END_KILLED_BY_USER, | 25 KILLED = 1, // Process was killed by user or system. |
26 HUNG = base::PROCESS_END_PROCESS_WAS_HUNG, | 26 HUNG = 2, // Process hung. |
27 INVALID_CMDLINE_URL, // An invalid command line url was given. | 27 INVALID_CMDLINE_URL, // An invalid command line url was given. |
28 SBOX_INIT_FAILED, // The sandbox could not be initialized. | 28 SBOX_INIT_FAILED, // The sandbox could not be initialized. |
29 GOOGLE_UPDATE_INIT_FAILED, // The Google Update client stub init failed. | 29 GOOGLE_UPDATE_INIT_FAILED, // The Google Update client stub init failed. |
30 GOOGLE_UPDATE_LAUNCH_FAILED,// Google Update could not launch chrome DLL. | 30 GOOGLE_UPDATE_LAUNCH_FAILED,// Google Update could not launch chrome DLL. |
31 BAD_PROCESS_TYPE, // The process is of an unknown type. | 31 BAD_PROCESS_TYPE, // The process is of an unknown type. |
32 MISSING_PATH, // An critical chrome path is missing. | 32 MISSING_PATH, // An critical chrome path is missing. |
33 MISSING_DATA, // A critical chrome file is missing. | 33 MISSING_DATA, // A critical chrome file is missing. |
34 SHELL_INTEGRATION_FAILED, // Failed to make Chrome default browser. | 34 SHELL_INTEGRATION_FAILED, // Failed to make Chrome default browser. |
35 MACHINE_LEVEL_INSTALL_EXISTS, // Machine level install exists | 35 MACHINE_LEVEL_INSTALL_EXISTS, // Machine level install exists |
36 UNINSTALL_DELETE_FILE_ERROR,// Error while deleting shortcuts. | 36 UNINSTALL_DELETE_FILE_ERROR,// Error while deleting shortcuts. |
(...skipping 20 matching lines...) Expand all Loading... |
57 | 57 |
58 PROFILE_IN_USE, // The profile was in use on another host. | 58 PROFILE_IN_USE, // The profile was in use on another host. |
59 | 59 |
60 UNINSTALL_EXTENSION_ERROR, // Failed to silently uninstall an extension. | 60 UNINSTALL_EXTENSION_ERROR, // Failed to silently uninstall an extension. |
61 | 61 |
62 EXIT_LAST_CODE // Last return code (keep it last). | 62 EXIT_LAST_CODE // Last return code (keep it last). |
63 }; | 63 }; |
64 }; | 64 }; |
65 | 65 |
66 #endif // CHROME_COMMON_RESULT_CODES_H_ | 66 #endif // CHROME_COMMON_RESULT_CODES_H_ |
OLD | NEW |