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

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

Issue 10662052: Use a better registration suffix that will always be unique while respecting the MSDN rules (2nd tr… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove extra empty line Created 8 years, 6 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') | chrome/installer/util/shell_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/uninstall.cc
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index e09be35b587edb877a8e5577fcd7a175cc36f8ca..6b0d7b11e765ad1fcc253e7edeedb3a5bf382e53 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -533,13 +533,18 @@ bool DeleteChromeRegistrationKeys(BrowserDistribution* dist, HKEY root,
// 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.
+ string16 old_style_suffix;
+ if (browser_entry_suffix.empty() ||
+ (ShellUtil::GetOldUserSpecificRegistrySuffix(&old_style_suffix) &&
+ browser_entry_suffix.compare(old_style_suffix) == 0)) {
robertshield 2012/06/27 02:22:29 on uninstall, should we not just unconditionally a
gab 2012/06/27 03:56:56 This would be more work in most cases, but I agree
grt (UTC plus 2) 2012/06/27 15:47:32 nit: i think "browser_entry_suffix == old_style_su
gab 2012/07/03 22:36:06 Done.
gab 2012/07/03 22:36:06 I removed this to always suffix with the passed in
grt (UTC plus 2) 2012/07/05 20:00:19 Does this mean old values will be left behind now?
gab 2012/07/05 21:19:53 No, it means I'm using the browser_entry_suffix pa
+ // Some appids were incorrectly registered (unsuffixed in dev-channel
+ // 21.0.1171.0 and username suffixed in dev 21.0.1180.0).
+ // Make sure the bad registrations get cleaned up here if they are present.
// 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 might still be using the bad appid when the registration update
+ // steps run.
+ InstallUtil::DeleteRegistryKey(
+ root, chrome_app_id + dist->GetBaseAppId() + browser_entry_suffix);
}
chrome_app_id.append(ShellUtil::GetBrowserModelId(dist, chrome_exe.value()));
InstallUtil::DeleteRegistryKey(root, chrome_app_id);
@@ -809,6 +814,17 @@ InstallStatus UninstallProduct(const InstallationState& original_state,
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.compare(old_style_suffix) != 0) {
grt (UTC plus 2) 2012/06/27 15:47:32 same nit as above: "suffix != old_style_suffix" is
gab 2012/07/03 22:36:06 Done.
+ 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') | chrome/installer/util/shell_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698