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

Unified Diff: chrome/installer/util/shell_util.cc

Issue 21477: Remove code that adds "Url Protocol" key to registry entry... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/installer/setup/main.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util.cc
===================================================================
--- chrome/installer/util/shell_util.cc (revision 9872)
+++ chrome/installer/util/shell_util.cc (working copy)
@@ -54,8 +54,6 @@
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 @@
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 @@
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 @@
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;
« no previous file with comments | « chrome/installer/setup/main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698