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

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

Issue 660168: Disable registering, unregistering, and setting default browser... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
===================================================================
--- chrome/installer/setup/uninstall.cc (revision 40086)
+++ chrome/installer/setup/uninstall.cc (working copy)
@@ -339,6 +339,11 @@
bool installer_setup::DeleteChromeRegistrationKeys(HKEY root,
const std::wstring& browser_entry_suffix,
installer_util::InstallStatus& exit_code) {
+ if (!BrowserDistribution::GetDistribution()->CanSetAsDefault()) {
+ // We should have never set those keys.
+ return true;
+ }
+
RegKey key(root, L"", KEY_ALL_ACCESS);
// Delete Software\Classes\ChromeHTML,
@@ -509,12 +514,15 @@
// Delete shared registry keys as well (these require admin rights) if
// remove_all option is specified.
if (remove_all) {
- // Delete media player registry key that exists only in HKLM.
- RegKey hklm_key(HKEY_LOCAL_MACHINE, L"", KEY_ALL_ACCESS);
- std::wstring reg_path(installer::kMediaPlayerRegPath);
- file_util::AppendToPath(&reg_path, installer_util::kChromeExe);
- DeleteRegistryKey(hklm_key, reg_path);
- hklm_key.Close();
+ if (!InstallUtil::IsChromeSxSProcess()) {
+ // Delete media player registry key that exists only in HKLM.
+ // We don't delete this key in SxS uninstall.
+ RegKey hklm_key(HKEY_LOCAL_MACHINE, L"", KEY_ALL_ACCESS);
+ std::wstring reg_path(installer::kMediaPlayerRegPath);
+ file_util::AppendToPath(&reg_path, installer_util::kChromeExe);
+ DeleteRegistryKey(hklm_key, reg_path);
+ hklm_key.Close();
+ }
if (installed_version.get()) {
// Unregister any dll servers that we may have registered.

Powered by Google App Engine
This is Rietveld 408576698