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

Side by Side Diff: chrome/common/result_codes.h

Issue 3386014: This adds some plumbing for propagating the status and error code of a (Closed)
Patch Set: Fixed Mac code to handle both SEGV and BUS Created 10 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 = base::TERMINATION_STATUS_NORMAL_TERMINATION,
25 TASKMAN_KILL = base::PROCESS_END_KILLED_BY_USER, 25 TASKMAN_KILL = base::TERMINATION_STATUS_PROCESS_WAS_KILLED,
26 HUNG = base::PROCESS_END_PROCESS_WAS_HUNG, 26 HUNG = base::TERMINATION_STATUS_PROCESS_WAS_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 18 matching lines...) Expand all
55 // signal to be reset so this chrome run does 55 // signal to be reset so this chrome run does
56 // not count as active chrome usage. 56 // not count as active chrome usage.
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 EXIT_LAST_CODE // Last return code (keep it last). 60 EXIT_LAST_CODE // Last return code (keep it last).
61 }; 61 };
62 }; 62 };
63 63
64 #endif // CHROME_COMMON_RESULT_CODES_H_ 64 #endif // CHROME_COMMON_RESULT_CODES_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698