diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-19 23:05:25 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-19 23:05:25 +0000 |
commit | 8f794cb1c1a3a989cf1fb2e453a56afadfa8db4c (patch) | |
tree | 3c6caa4facc64ee5e257591b135554b26027a2ff /chrome/installer/setup | |
parent | 721c3f17a7fb36edaa17f607a11db9c82ba720ca (diff) | |
download | chromium_src-8f794cb1c1a3a989cf1fb2e453a56afadfa8db4c.zip chromium_src-8f794cb1c1a3a989cf1fb2e453a56afadfa8db4c.tar.gz chromium_src-8f794cb1c1a3a989cf1fb2e453a56afadfa8db4c.tar.bz2 |
Move creation of 'open with' registry keys to installer. We should place nice and not create these keys on every Chrome start just in case user wants a customized open with list. So now we only create these keys at installation or when user choses to make Chrome default browser. Also we clean them up on uninstall.
BUG=1190855
Review URL: http://codereview.chromium.org/11491
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5726 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r-- | chrome/installer/setup/uninstall.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc index 4bf5856..27e8801 100644 --- a/chrome/installer/setup/uninstall.cc +++ b/chrome/installer/setup/uninstall.cc @@ -258,12 +258,29 @@ installer_util::InstallStatus installer_setup::UninstallChrome( DeleteRegistryValue(reg_root, ShellUtil::kRegRegisteredApplications, dist->GetApplicationName()); + + // Cleanup Software\Classes\Applications\chrome.exe and OpenWithList + RegKey hklm_key(HKEY_LOCAL_MACHINE, L"", KEY_ALL_ACCESS); + std::wstring app_key(ShellUtil::kRegClasses); + file_util::AppendToPath(&app_key, L"Applications"); + file_util::AppendToPath(&app_key, installer_util::kChromeExe); + DeleteRegistryKey(key, app_key); + if (remove_all) + DeleteRegistryKey(hklm_key, app_key); + for (int i = 0; ShellUtil::kFileAssociations[i] != NULL; i++) { + std::wstring open_with_key(ShellUtil::kRegClasses); + file_util::AppendToPath(&open_with_key, ShellUtil::kFileAssociations[i]); + file_util::AppendToPath(&open_with_key, L"OpenWithList"); + file_util::AppendToPath(&open_with_key, installer_util::kChromeExe); + DeleteRegistryKey(key, open_with_key); + if (remove_all) + DeleteRegistryKey(hklm_key, open_with_key); + } key.Close(); // Delete shared registry keys as well (these require admin rights) if // remove_all option is specified. if (remove_all) { - RegKey hklm_key(HKEY_LOCAL_MACHINE, L"", KEY_ALL_ACCESS); DeleteRegistryKey(hklm_key, set_access_key); DeleteRegistryKey(hklm_key, html_prog_id); DeleteRegistryValue(HKEY_LOCAL_MACHINE, |