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

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

Issue 10703155: Merge 145596 - Use a better registration suffix that will always be unique while respecting the MSD… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/installer/util/shell_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/uninstall.cc
===================================================================
--- chrome/installer/setup/uninstall.cc (revision 146242)
+++ chrome/installer/setup/uninstall.cc (working copy)
@@ -533,15 +533,9 @@
// Delete Software\Classes\Chrome (Same comment as above applies for this too)
string16 chrome_app_id(ShellUtil::kRegClasses);
chrome_app_id.push_back(FilePath::kSeparators[0]);
- if (browser_entry_suffix.empty()) {
- // An unsuffixed appid used to be registered on some user-level install
- // (dev-channel 21.0.1171.0). Make sure it gets cleaned up here.
- // Note: this couldn't be cleaned on update as a currently running old
- // chrome might still be using the unsuffixed appid when the registration
- // update steps run.
- InstallUtil::DeleteRegistryKey(root, chrome_app_id + dist->GetBaseAppId());
- }
- chrome_app_id.append(ShellUtil::GetBrowserModelId(dist, chrome_exe.value()));
+ // Append the requested suffix manually here (as ShellUtil::GetBrowserModelId
+ // would otherwise try to figure out the currently installed suffix).
+ chrome_app_id.append(dist->GetBaseAppId() + browser_entry_suffix);
InstallUtil::DeleteRegistryKey(root, chrome_app_id);
// Delete all Start Menu Internet registrations that refer to this Chrome.
@@ -809,6 +803,17 @@
if (!suffix.empty()) {
DeleteChromeRegistrationKeys(browser_dist, HKEY_CURRENT_USER, string16(),
installer_state.target_path(), &ret);
+
+ // For similar reasons it is possible in very few installs (from 21.0.1180.0
+ // and fixed shortly after) to be installed with the new-style suffix, but
+ // have some old-style suffix registrations left behind.
+ string16 old_style_suffix;
+ if (ShellUtil::GetOldUserSpecificRegistrySuffix(&old_style_suffix) &&
+ suffix != old_style_suffix) {
+ DeleteChromeRegistrationKeys(browser_dist, HKEY_CURRENT_USER,
+ old_style_suffix,
+ installer_state.target_path(), &ret);
+ }
}
// Chrome is registered in HKLM for all system-level installs and for
« no previous file with comments | « no previous file | chrome/installer/util/shell_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698