summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/setup/uninstall.cc23
-rw-r--r--chrome/installer/util/util_constants.cc4
2 files changed, 23 insertions, 4 deletions
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 1a1c518..3ce98d6 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -337,6 +337,26 @@ installer_util::InstallStatus IsChromeActiveOrUserCancelled(
return installer_util::UNINSTALL_CONFIRMED;
}
+
+bool ShouldDeleteProfile(const CommandLine& cmd_line,
+ installer_util::InstallStatus status) {
+ bool should_delete = false;
+
+ // Chrome Frame uninstallations always want to delete the profile (we have no
+ // UI to prompt otherwise and the profile stores no useful data anyway)
+ // unless they are managed by MSI. MSI uninstalls will explicitly include
+ // the --delete-profile flag to distinguish them from MSI upgrades.
+ if (InstallUtil::IsChromeFrameProcess() && !InstallUtil::IsMSIProcess()) {
+ should_delete = true;
+ } else {
+ should_delete =
+ status == installer_util::UNINSTALL_DELETE_PROFILE ||
+ cmd_line.HasSwitch(installer_util::switches::kDeleteProfile);
+ }
+
+ return should_delete;
+}
+
} // namespace
@@ -549,8 +569,7 @@ installer_util::InstallStatus installer_setup::UninstallChrome(
// Finally delete all the files from Chrome folder after moving setup.exe
// and the user's Local State to a temp location.
- bool delete_profile = (status == installer_util::UNINSTALL_DELETE_PROFILE) ||
- (cmd_line.HasSwitch(installer_util::switches::kDeleteProfile));
+ bool delete_profile = ShouldDeleteProfile(cmd_line, status);
std::wstring local_state_path;
ret = installer_util::UNINSTALL_SUCCESSFUL;
diff --git a/chrome/installer/util/util_constants.cc b/chrome/installer/util/util_constants.cc
index 5980992..183bb69 100644
--- a/chrome/installer/util/util_constants.cc
+++ b/chrome/installer/util/util_constants.cc
@@ -17,8 +17,8 @@ const wchar_t kChromeSxS[] = L"chrome-sxs";
// Create Desktop and QuickLaunch shortcuts
const wchar_t kCreateAllShortcuts[] = L"create-all-shortcuts";
-// Delete user profile also. This param is useful only when specified with
-// kUninstall && kForceUninstall, otherwise it is silently ignored.
+// Delete user profile data. This param is useful only when specified with
+// kUninstall, otherwise it is silently ignored.
const wchar_t kDeleteProfile[] = L"delete-profile";
// Disable logging