michael@0: // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #ifndef CHROME_COMMON_RESULT_CODES_H_ michael@0: #define CHROME_COMMON_RESULT_CODES_H_ michael@0: michael@0: #include "base/process_util.h" michael@0: michael@0: // This file consolidates all the return codes for the browser and renderer michael@0: // process. The return code is the value that: michael@0: // a) is returned by main() or winmain(), or michael@0: // b) specified in the call for ExitProcess() or TerminateProcess(), or michael@0: // c) the exception value that causes a process to terminate. michael@0: // michael@0: // It is advisable to not use negative numbers because the Windows API returns michael@0: // it as an unsigned long and the exception values have high numbers. For michael@0: // example EXCEPTION_ACCESS_VIOLATION value is 0xC0000005. michael@0: michael@0: class ResultCodes { michael@0: public: michael@0: enum ExitCode { michael@0: NORMAL_EXIT = base::PROCESS_END_NORMAL_TERMINATON, michael@0: TASKMAN_KILL = base::PROCESS_END_KILLED_BY_USER, michael@0: HUNG = base::PROCESS_END_PROCESS_WAS_HUNG, michael@0: INVALID_CMDLINE_URL, // An invalid command line url was given. michael@0: SBOX_INIT_FAILED, // The sandbox could not be initialized. michael@0: GOOGLE_UPDATE_INIT_FAILED, // The Google Update client stub init failed. michael@0: GOOGLE_UPDATE_LAUNCH_FAILED,// Google Update could not launch chrome DLL. michael@0: BAD_PROCESS_TYPE, // The process is of an unknown type. michael@0: MISSING_PATH, // An critical chrome path is missing. michael@0: MISSING_DATA, // A critical chrome file is missing. michael@0: SHELL_INTEGRATION_FAILED, // Failed to make Chrome default browser. michael@0: MACHINE_LEVEL_INSTALL_EXISTS, // Machine level install exists michael@0: UNINSTALL_DELETE_FILE_ERROR,// Error while deleting shortcuts. michael@0: UNINSTALL_CHROME_ALIVE, // Uninstall detected another chrome instance. michael@0: UNINSTALL_NO_SURVEY, // Do not launch survey after uninstall. michael@0: UNINSTALL_USER_CANCEL, // The user changed her mind. michael@0: UNINSTALL_DELETE_PROFILE, // Delete profile as well during uninstall. michael@0: UNSUPPORTED_PARAM, // Command line parameter is not supported. michael@0: KILLED_BAD_MESSAGE, // A bad message caused the process termination. michael@0: IMPORTER_CANCEL, // The user canceled the browser import. michael@0: IMPORTER_HUNG, // Browser import hung and was killed. michael@0: EXIT_LAST_CODE // Last return code (keep it last). michael@0: }; michael@0: }; michael@0: michael@0: #endif // CHROME_COMMON_RESULT_CODES_H_