Index: chrome/installer/setup/uninstall.cc |
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc |
index 51b9717bcacda0bf8554dbbf2205172b18f0f84b..0d8bd7a8ebe777cc08ec07b42c2d90b70ea32889 100644 |
--- a/chrome/installer/setup/uninstall.cc |
+++ b/chrome/installer/setup/uninstall.cc |
@@ -583,19 +583,19 @@ bool DeleteChromeRegistrationKeys(BrowserDistribution* dist, HKEY root, |
// For user-level installs we now only write these entries in HKCU, but since |
// old installs did install them to HKLM we will try to remove them in HKLM as |
// well anyways. |
- string16 html_prog_id(ShellUtil::kRegClasses); |
- html_prog_id.push_back(FilePath::kSeparators[0]); |
- html_prog_id.append(ShellUtil::kChromeHTMLProgId); |
- html_prog_id.append(browser_entry_suffix); |
- InstallUtil::DeleteRegistryKey(root, html_prog_id); |
+ const string16 prog_id(ShellUtil::kChromeHTMLProgId + browser_entry_suffix); |
+ string16 reg_prog_id(ShellUtil::kRegClasses); |
+ reg_prog_id.push_back(FilePath::kSeparators[0]); |
+ reg_prog_id.append(prog_id); |
+ InstallUtil::DeleteRegistryKey(root, reg_prog_id); |
// 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]); |
+ string16 reg_app_id(ShellUtil::kRegClasses); |
+ reg_app_id.push_back(FilePath::kSeparators[0]); |
// 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); |
+ reg_app_id.append(dist->GetBaseAppId() + browser_entry_suffix); |
+ InstallUtil::DeleteRegistryKey(root, reg_app_id); |
// Delete all Start Menu Internet registrations that refer to this Chrome. |
{ |
@@ -650,16 +650,24 @@ bool DeleteChromeRegistrationKeys(BrowserDistribution* dist, HKEY root, |
InstallUtil::DeleteRegistryKey(root, app_path_key); |
// Cleanup OpenWithList |
robertshield
2012/08/05 15:01:12
Please add links to http://msdn.microsoft.com/en-u
gab
2012/08/06 19:39:27
Done.
|
- string16 open_with_key; |
- for (int i = 0; ShellUtil::kFileAssociations[i] != NULL; i++) { |
- open_with_key.assign(ShellUtil::kRegClasses); |
- open_with_key.push_back(FilePath::kSeparators[0]); |
- open_with_key.append(ShellUtil::kFileAssociations[i]); |
- open_with_key.push_back(FilePath::kSeparators[0]); |
- open_with_key.append(L"OpenWithList"); |
- open_with_key.push_back(FilePath::kSeparators[0]); |
- open_with_key.append(installer::kChromeExe); |
- InstallUtil::DeleteRegistryKey(root, open_with_key); |
+ string16 file_assoc_key; |
+ string16 open_with_list_key; |
+ string16 open_with_progids_key; |
+ for (int i = 0; ShellUtil::kFileAssociations[i] != NULL; ++i) { |
+ file_assoc_key.assign(ShellUtil::kRegClasses); |
+ file_assoc_key.push_back(FilePath::kSeparators[0]); |
+ file_assoc_key.append(ShellUtil::kFileAssociations[i]); |
+ file_assoc_key.push_back(FilePath::kSeparators[0]); |
+ |
+ open_with_list_key.assign(file_assoc_key); |
+ open_with_list_key.append(L"OpenWithList"); |
+ open_with_list_key.push_back(FilePath::kSeparators[0]); |
+ open_with_list_key.append(installer::kChromeExe); |
+ InstallUtil::DeleteRegistryKey(root, open_with_list_key); |
+ |
+ open_with_progids_key.assign(file_assoc_key); |
+ open_with_progids_key.append(ShellUtil::kRegOpenWithProgids); |
+ InstallUtil::DeleteRegistryValue(root, open_with_progids_key, prog_id); |
} |
// Cleanup in case Chrome had been made the default browser. |
@@ -1016,7 +1024,7 @@ InstallStatus UninstallProduct(const InstallationState& original_state, |
// GetCurrentInstallationSuffix() above)). |
// TODO(gab): This can still leave parts of a suffixed install behind. To be |
// able to remove them we would need to be able to remove only suffixed |
- // entries (as it is now some of the shell integration entries are |
+ // entries (as it is now some of the registry entries (e.g. App Paths) are |
// unsuffixed; thus removing suffixed installs is prohibited in HKLM if |
// !|remove_all| for now). |
if (installer_state.system_install() || |