|
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
|
2 // Use of this source code is governed by a BSD-style license that can be |
|
3 // found in the LICENSE file. |
|
4 |
|
5 #ifndef CHROME_COMMON_RESULT_CODES_H_ |
|
6 #define CHROME_COMMON_RESULT_CODES_H_ |
|
7 |
|
8 #include "base/process_util.h" |
|
9 |
|
10 // This file consolidates all the return codes for the browser and renderer |
|
11 // process. The return code is the value that: |
|
12 // a) is returned by main() or winmain(), or |
|
13 // b) specified in the call for ExitProcess() or TerminateProcess(), or |
|
14 // c) the exception value that causes a process to terminate. |
|
15 // |
|
16 // It is advisable to not use negative numbers because the Windows API returns |
|
17 // it as an unsigned long and the exception values have high numbers. For |
|
18 // example EXCEPTION_ACCESS_VIOLATION value is 0xC0000005. |
|
19 |
|
20 class ResultCodes { |
|
21 public: |
|
22 enum ExitCode { |
|
23 NORMAL_EXIT = base::PROCESS_END_NORMAL_TERMINATON, |
|
24 TASKMAN_KILL = base::PROCESS_END_KILLED_BY_USER, |
|
25 HUNG = base::PROCESS_END_PROCESS_WAS_HUNG, |
|
26 INVALID_CMDLINE_URL, // An invalid command line url was given. |
|
27 SBOX_INIT_FAILED, // The sandbox could not be initialized. |
|
28 GOOGLE_UPDATE_INIT_FAILED, // The Google Update client stub init failed. |
|
29 GOOGLE_UPDATE_LAUNCH_FAILED,// Google Update could not launch chrome DLL. |
|
30 BAD_PROCESS_TYPE, // The process is of an unknown type. |
|
31 MISSING_PATH, // An critical chrome path is missing. |
|
32 MISSING_DATA, // A critical chrome file is missing. |
|
33 SHELL_INTEGRATION_FAILED, // Failed to make Chrome default browser. |
|
34 MACHINE_LEVEL_INSTALL_EXISTS, // Machine level install exists |
|
35 UNINSTALL_DELETE_FILE_ERROR,// Error while deleting shortcuts. |
|
36 UNINSTALL_CHROME_ALIVE, // Uninstall detected another chrome instance. |
|
37 UNINSTALL_NO_SURVEY, // Do not launch survey after uninstall. |
|
38 UNINSTALL_USER_CANCEL, // The user changed her mind. |
|
39 UNINSTALL_DELETE_PROFILE, // Delete profile as well during uninstall. |
|
40 UNSUPPORTED_PARAM, // Command line parameter is not supported. |
|
41 KILLED_BAD_MESSAGE, // A bad message caused the process termination. |
|
42 IMPORTER_CANCEL, // The user canceled the browser import. |
|
43 IMPORTER_HUNG, // Browser import hung and was killed. |
|
44 EXIT_LAST_CODE // Last return code (keep it last). |
|
45 }; |
|
46 }; |
|
47 |
|
48 #endif // CHROME_COMMON_RESULT_CODES_H_ |