Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: chrome/installer/setup/uninstall.cc

Issue 1243293003: Platform-specific prune state storage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prune1
Patch Set: map-compatible proto2 messages Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/installer/setup/uninstall.cc
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 0404b79140a31ff838dfdf374e4a916f057f4b6b..1fba48d91c7c6c99e68e7f49777e48bcfa6a1c1c 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -837,7 +837,7 @@ void UninstallActiveSetupEntries(const InstallerState& installer_state,
}
// Removes the persistent blacklist state for the current user. Note: this will
-// not remove the state for users other than the one uninstalling chrome on a
+// not remove the state for users other than the one uninstalling Chrome on a
// system-level install (http://crbug.com/388725). Doing so would require
// extracting the per-user registry hive iteration from
// UninstallActiveSetupEntries so that it could service multiple tasks.
@@ -850,6 +850,15 @@ void RemoveBlacklistState() {
0); // wow64_access
}
+// Removes the persistent state for |distribution| for the current user. Note:
+// this will not remove the state for users other than the one uninstalling
+// Chrome on a system-level install; see RemoveBlacklistState for details.
+void RemoveDistributionRegistryState(BrowserDistribution* distribution) {
+ base::string16 key_name(L"Software\\");
+ key_name += distribution->GetInstallSubDir();
+ InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, key_name, KEY_WOW64_32KEY);
+}
+
} // namespace
DeleteResult DeleteChromeDirectoriesIfEmpty(
@@ -1339,8 +1348,10 @@ InstallStatus UninstallProduct(const InstallationState& original_state,
}
}
- if (delete_profile)
+ if (delete_profile) {
DeleteUserDataDir(user_data_dir, product.is_chrome_frame());
+ RemoveDistributionRegistryState(browser_dist);
+ }
if (!force_uninstall) {
VLOG(1) << "Uninstallation complete. Launching post-uninstall operations.";

Powered by Google App Engine
This is Rietveld 408576698