diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-19 19:53:14 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-19 19:53:14 +0000 |
commit | 1fcfb2066570eb096964567c841f6a1bd6cb1ec5 (patch) | |
tree | 5cac121ea9daa9436903e6c30902ed9c49033e32 /chrome/installer | |
parent | b0dee8a4fb85517e0b57daf343293f945796940d (diff) | |
download | chromium_src-1fcfb2066570eb096964567c841f6a1bd6cb1ec5.zip chromium_src-1fcfb2066570eb096964567c841f6a1bd6cb1ec5.tar.gz chromium_src-1fcfb2066570eb096964567c841f6a1bd6cb1ec5.tar.bz2 |
Take two at splitting result codes between content and chrome.
content/common/result_codes.h contains only the codes defined in content. chrome/common/chrome_result_codes.h contains the codes defined in chrome and also includes (for convenience) the content header.
R=jam@chromium.org
BUG=76699
TEST=everything compiles
Review URL: http://codereview.chromium.org/7397004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93082 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/setup/uninstall.cc | 22 | ||||
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc index 56f2bdd..c812e79 100644 --- a/chrome/installer/setup/uninstall.cc +++ b/chrome/installer/setup/uninstall.cc @@ -16,6 +16,7 @@ #include "base/win/windows_version.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths_internal.h" +#include "chrome/common/chrome_result_codes.h" #include "chrome/installer/setup/install.h" #include "chrome/installer/setup/install_worker.h" #include "chrome/installer/setup/setup_constants.h" @@ -32,7 +33,6 @@ #include "chrome/installer/util/self_cleaning_temp_dir.h" #include "chrome/installer/util/shell_util.h" #include "chrome/installer/util/util_constants.h" -#include "content/common/result_codes.h" #include "rlz/win/lib/rlz_lib.h" // Build-time generated include file. @@ -138,9 +138,9 @@ void CloseAllChromeProcesses() { if (!SendMessageTimeout(tmpWnd, WM_CLOSE, 0, 0, SMTO_BLOCK, 3000, NULL) && (GetLastError() == ERROR_TIMEOUT)) { base::CleanupProcesses(installer::kChromeExe, 0, - ResultCodes::HUNG, NULL); + content::RESULT_CODE_HUNG, NULL); base::CleanupProcesses(installer::kNaClExe, 0, - ResultCodes::HUNG, NULL); + content::RESULT_CODE_HUNG, NULL); return; } } @@ -150,9 +150,9 @@ void CloseAllChromeProcesses() { // chrome.exe. This check is just in case Chrome is ignoring WM_CLOSE // messages. base::CleanupProcesses(installer::kChromeExe, 15000, - ResultCodes::HUNG, NULL); + content::RESULT_CODE_HUNG, NULL); base::CleanupProcesses(installer::kNaClExe, 15000, - ResultCodes::HUNG, NULL); + content::RESULT_CODE_HUNG, NULL); } // Attempts to close the Chrome Frame helper process by sending WM_CLOSE @@ -187,7 +187,7 @@ void CloseChromeFrameHelperProcess() { if (kill) { VLOG(1) << installer::kChromeFrameHelperExe << " hung. Killing."; base::CleanupProcesses(installer::kChromeFrameHelperExe, 0, - ResultCodes::HUNG, NULL); + content::RESULT_CODE_HUNG, NULL); } } @@ -440,7 +440,7 @@ DeleteResult DeleteFilesAndFolders(const InstallerState& installer_state, InstallStatus IsChromeActiveOrUserCancelled( const InstallerState& installer_state, const Product& product) { - int32 exit_code = ResultCodes::NORMAL_EXIT; + int32 exit_code = content::RESULT_CODE_NORMAL_EXIT; CommandLine options(CommandLine::NO_PROGRAM); options.AppendSwitch(installer::switches::kUninstall); @@ -457,12 +457,12 @@ InstallStatus IsChromeActiveOrUserCancelled( &exit_code)) { VLOG(1) << "chrome.exe launched for uninstall confirmation returned: " << exit_code; - if ((exit_code == ResultCodes::UNINSTALL_CHROME_ALIVE) || - (exit_code == ResultCodes::UNINSTALL_USER_CANCEL) || - (exit_code == ResultCodes::HUNG)) + if ((exit_code == chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE) || + (exit_code == chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) || + (exit_code == content::RESULT_CODE_HUNG)) return installer::UNINSTALL_CANCELLED; - if (exit_code == ResultCodes::UNINSTALL_DELETE_PROFILE) + if (exit_code == chrome::RESULT_CODE_UNINSTALL_DELETE_PROFILE) return installer::UNINSTALL_DELETE_PROFILE; } else { PLOG(ERROR) << "Failed to launch chrome.exe for uninstall confirmation."; diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index 6d5dd8f..5b8489d 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -24,6 +24,7 @@ #include "base/win/registry.h" #include "base/win/windows_version.h" #include "chrome/common/attrition_experiments.h" +#include "chrome/common/chrome_result_codes.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/installer/util/channel_info.h" @@ -36,7 +37,6 @@ #include "chrome/installer/util/util_constants.h" #include "chrome/installer/util/wmi.h" #include "content/common/json_value_serializer.h" -#include "content/common/result_codes.h" #include "installer_util_strings.h" // NOLINT @@ -777,13 +777,13 @@ void GoogleChromeDistribution::InactiveUserToastExperiment(int flavor, // The chrome process has exited, figure out what happened. const wchar_t* outcome = NULL; switch (exit_code) { - case ResultCodes::NORMAL_EXIT: + case content::RESULT_CODE_NORMAL_EXIT: outcome = kToastExpTriesOkGroup; break; - case ResultCodes::NORMAL_EXIT_CANCEL: + case chrome::RESULT_CODE_NORMAL_EXIT_CANCEL: outcome = kToastExpCancelGroup; break; - case ResultCodes::NORMAL_EXIT_EXP2: + case chrome::RESULT_CODE_NORMAL_EXIT_EXP2: outcome = kToastExpUninstallGroup; break; default: |