summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authornsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-05 19:52:32 +0000
committernsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-05 19:52:32 +0000
commitd567ba645944f73a00d70fd356ba282716856b85 (patch)
tree3e3ad36c726d1edc9835c5cb5c570089fb6dcbcc /chrome
parentac510e1f4a322381d1e82c9669bfd3c05113d6e6 (diff)
downloadchromium_src-d567ba645944f73a00d70fd356ba282716856b85.zip
chromium_src-d567ba645944f73a00d70fd356ba282716856b85.tar.gz
chromium_src-d567ba645944f73a00d70fd356ba282716856b85.tar.bz2
Revert revision 380 to see if it fixes the build. Please reapply once the tree is green.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/result_codes.h2
-rw-r--r--chrome/browser/browser_main.cc6
-rw-r--r--chrome/installer/setup/uninstall.cc24
3 files changed, 13 insertions, 19 deletions
diff --git a/chrome/app/result_codes.h b/chrome/app/result_codes.h
index 8ba12aa..9e8ff2f 100644
--- a/chrome/app/result_codes.h
+++ b/chrome/app/result_codes.h
@@ -52,7 +52,7 @@ class ResultCodes {
MISSING_PATH, // An critical chrome path is missing.
MISSING_DATA, // A critical chrome file is missing.
SHELL_INTEGRATION_FAILED, // Failed to make Chrome default browser.
- UNINSTALL_DELETE_FILE_ERROR,// Error while deleting shortcuts.
+ UNINSTALL_ERROR, // Unspecified error while uninstalling.
UNINSTALL_CHROME_ALIVE, // Uninstall detected another chrome instance.
UNINSTALL_NO_SURVEY, // Do not launch survey after uninstall.
UNINSTALL_USER_CANCEL, // The user changed her mind.
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 686be7c..057e254 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -182,11 +182,11 @@ int DoUninstallTasks() {
LOG(INFO) << "Executing uninstall actions";
ResultCodes::ExitCode ret = ResultCodes::NORMAL_EXIT;
if (!FirstRun::RemoveSentinel())
- ret = ResultCodes::UNINSTALL_DELETE_FILE_ERROR;
+ ret = ResultCodes::UNINSTALL_ERROR;
if (!FirstRun::RemoveChromeDesktopShortcut())
- ret = ResultCodes::UNINSTALL_DELETE_FILE_ERROR;
+ ret = ResultCodes::UNINSTALL_ERROR;
if (!FirstRun::RemoveChromeQuickLaunchShortcut())
- ret = ResultCodes::UNINSTALL_DELETE_FILE_ERROR;
+ ret = ResultCodes::UNINSTALL_ERROR;
return ret;
}
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index d742e62..9403a8a 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -119,12 +119,8 @@ installer_util::InstallStatus IsChromeActiveOrUserCancelled(
int32 exit_code = ResultCodes::NORMAL_EXIT;
bool is_timeout = false;
- // We want to continue with the uninstallation only when chrome.exe either
- // returns NORMAL_EXIT (means Chrome is not running, user has confirmed
- // uninstallation and sentinel file/desktop/ql shortcuts have been
- // cleaned up) or UNINSTALL_DELETE_FILE_ERROR (means Chrome is not running,
- // user has confirmed uninstallation but there was a problem with deleting
- // sentinel file, desktop or ql shortcuts).
+ // We ignore all other errors such as whether launching chrome fails,
+ // whether chrome returns UNINSTALL_ERROR, etc.
LOG(INFO) << "Launching Chrome to do uninstall tasks.";
if (installer::LaunchChromeAndWaitForResult(system_uninstall,
kCmdLineOptions,
@@ -132,21 +128,18 @@ installer_util::InstallStatus IsChromeActiveOrUserCancelled(
&exit_code,
&is_timeout)) {
if (is_timeout || exit_code == ResultCodes::UNINSTALL_CHROME_ALIVE) {
- LOG(INFO) << "Can't uninstall when chrome is still running";
+ LOG(ERROR) << "Can't uninstall when chrome is still running";
return installer_util::CHROME_RUNNING;
} else if (exit_code == ResultCodes::UNINSTALL_USER_CANCEL) {
LOG(INFO) << "User cancelled uninstall operation";
return installer_util::UNINSTALL_CANCELLED;
- } else if (exit_code == ResultCodes::NORMAL_EXIT) {
- LOG(INFO) << "chrome.exe confirmed uninstallation from user.";
- return installer_util::UNINSTALL_CONFIRMED;
- } else if (exit_code == ResultCodes::UNINSTALL_DELETE_FILE_ERROR) {
- LOG(ERROR) << "chrome.exe returned delete file error.";
- return installer_util::UNINSTALL_CONFIRMED;
+ } else if (exit_code == ResultCodes::UNINSTALL_ERROR) {
+ LOG(ERROR) << "chrome.exe reported error while uninstalling.";
+ return installer_util::UNINSTALL_FAILED;
}
}
- return installer_util::UNINSTALL_FAILED;
+ return installer_util::UNINSTALL_CONFIRMED;
}
// Read the URL from the resource file and substitute the locale parameter
@@ -229,7 +222,8 @@ installer_util::InstallStatus installer_setup::UninstallChrome(
const installer::Version& installed_version, bool remove_all) {
installer_util::InstallStatus status =
IsChromeActiveOrUserCancelled(system_uninstall);
- if (status != installer_util::UNINSTALL_CONFIRMED)
+ if (status == installer_util::CHROME_RUNNING ||
+ status == installer_util::UNINSTALL_CANCELLED)
return status;
// Uninstall Gears first.