summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup/install.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 19:09:52 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 19:09:52 +0000
commitc45d289dcd3209903c22afd8fcb546b417dabddf (patch)
tree2bbb2a994e97a2650f75a37b938bee0ea64e391f /chrome/installer/setup/install.cc
parent3a31d4855b91065ffd87d7de3f4db0ef92c94ec7 (diff)
downloadchromium_src-c45d289dcd3209903c22afd8fcb546b417dabddf.zip
chromium_src-c45d289dcd3209903c22afd8fcb546b417dabddf.tar.gz
chromium_src-c45d289dcd3209903c22afd8fcb546b417dabddf.tar.bz2
Improving Chrome Frame uninstall process:
1) Don't kill chrome.exe when uninstalling. This leads to immediate breakage of any running Chrome Frame windows and is also annoying if the user also happens to be using Google Chrome or some variant thereof. 2) If files are in use at uninstall time, schedule them for deletion and prompt the user to reboot. 3) Remember to remove any pending scheduled deletes at install time. Review URL: http://codereview.chromium.org/235060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup/install.cc')
-rw-r--r--chrome/installer/setup/install.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 24d2f80..1bc8164 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -15,6 +15,7 @@
#include "chrome/installer/setup/setup_constants.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/create_reg_key_work_item.h"
+#include "chrome/installer/util/delete_after_reboot_helper.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
@@ -95,7 +96,7 @@ void AddUninstallShortcutWorkItems(HKEY reg_root,
uninstall_cmd.append(L"\" --");
uninstall_cmd.append(installer_util::switches::kUninstall);
-#ifdef CHROME_FRAME_BUILD
+#if defined(CHROME_FRAME_BUILD)
uninstall_cmd.append(L" --");
uninstall_cmd.append(installer_util::switches::kForceUninstall);
uninstall_cmd.append(L" --");
@@ -246,7 +247,7 @@ bool CreateOrUpdateChromeShortcuts(const std::wstring& exe_path,
std::wstring arguments(L" --");
arguments.append(installer_util::switches::kUninstall);
-#ifdef CHROME_FRAME_BUILD
+#if defined(CHROME_FRAME_BUILD)
arguments.append(L" --");
arguments.append(installer_util::switches::kForceUninstall);
arguments.append(L" --");
@@ -459,6 +460,13 @@ bool InstallNewVersion(const std::wstring& exe_path,
if (reg_root != HKEY_LOCAL_MACHINE && reg_root != HKEY_CURRENT_USER)
return false;
+#if defined(CHROME_FRAME_BUILD)
+ // Make sure that we don't end up deleting installed files on next reboot.
+ if (!RemoveFromMovesPendingReboot(install_path.c_str())) {
+ LOG(ERROR) << "Error accessing pending moves value.";
+ }
+#endif
+
scoped_ptr<WorkItemList> install_list(WorkItem::CreateWorkItemList());
// A temp directory that work items need and the actual install directory.
install_list->AddCreateDirWorkItem(FilePath::FromWStringHack(temp_dir));