summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/installer/setup/main.cc2
-rw-r--r--chrome/installer/util/shell_util.cc14
2 files changed, 12 insertions, 4 deletions
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc
index 0519a15..314d5fc 100644
--- a/chrome/installer/setup/main.cc
+++ b/chrome/installer/setup/main.cc
@@ -508,7 +508,7 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
// If --register-chrome-browser option is specified, register all
// Chrome protocol/file associations as well as register it as a valid
- // browser for StarMenu->Internet shortcut. This option should only
+ // browser for Start Menu->Internet shortcut. This option should only
// be used when setup.exe is launched with admin rights. We do not
// make any user specific changes in this option.
if (parsed_command_line.HasSwitch(
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;