diff options
author | sverrir@chromium.org <sverrir@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 19:01:20 +0000 |
---|---|---|
committer | sverrir@chromium.org <sverrir@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 19:01:20 +0000 |
commit | 5e5bf59cbc75839aafef3ae29bcb53408adb715d (patch) | |
tree | 966b9429cc518ee2131627a39db02cd572d99f82 /chrome/installer/util/shell_util.cc | |
parent | da608d200aa6c54df03fa18d50a3daad6b8a3949 (diff) | |
download | chromium_src-5e5bf59cbc75839aafef3ae29bcb53408adb715d.zip chromium_src-5e5bf59cbc75839aafef3ae29bcb53408adb715d.tar.gz chromium_src-5e5bf59cbc75839aafef3ae29bcb53408adb715d.tar.bz2 |
Remove code that adds "Url Protocol" key to registry entry
for ChromeHTML. This removes the feature where you
can launch Chrome using chromehtml: links in e.g. IE.
BUG=5825
Review URL: http://codereview.chromium.org/21477
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/shell_util.cc')
-rw-r--r-- | chrome/installer/util/shell_util.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index 96f73cf..69721d3 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -54,8 +54,6 @@ class RegistryEntry { entries.push_front(new RegistryEntry(L"Software\\Classes\\ChromeHTML", ShellUtil::kChromeHTMLProgIdDesc)); - entries.push_front(new RegistryEntry(L"Software\\Classes\\ChromeHTML", - ShellUtil::kRegUrlProtocol, L"")); entries.push_front(new RegistryEntry( L"Software\\Classes\\ChromeHTML\\DefaultIcon", icon_path)); entries.push_front(new RegistryEntry( @@ -216,7 +214,7 @@ bool IsChromeRegistered(const std::wstring& chrome_exe) { registered = false; delete (*itr); } - LOG(INFO) << "Check for Chrome registeration returned " << registered; + LOG(INFO) << "Check for Chrome registration returned " << registered; return registered; } @@ -366,6 +364,13 @@ ShellUtil::RegisterStatus RegisterOnVista(const std::wstring& chrome_exe, return ShellUtil::FAILURE; } +// Remove unnecessary "URL Protocol" entry from shell registration. This value +// was written by older installers so ignoring error conditions. +void RemoveUrlProtocol(HKEY root) { + RegKey key(root, L"Software\\Classes\\ChromeHTML", KEY_ALL_ACCESS); + key.DeleteValue(ShellUtil::kRegUrlProtocol); +} + } // namespace @@ -396,6 +401,9 @@ const wchar_t* ShellUtil::kChromeExtProgIdDesc = L"Chrome Extension Installer"; ShellUtil::RegisterStatus ShellUtil::AddChromeToSetAccessDefaults( const std::wstring& chrome_exe, bool skip_if_not_admin) { + RemoveUrlProtocol(HKEY_LOCAL_MACHINE); + RemoveUrlProtocol(HKEY_CURRENT_USER); + if (IsChromeRegistered(chrome_exe)) return ShellUtil::SUCCESS; |