diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/installer/util/shell_util.cc | 13 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.h | 12 |
2 files changed, 14 insertions, 11 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index ba8c0fe..3ad7d08 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -51,7 +51,9 @@ class RegistryEntry { std::wstring open_cmd = ShellUtil::GetChromeShellOpenCmd(chrome_exe); entries.push_front(new RegistryEntry(L"Software\\Classes\\ChromeHTML", - L"Chrome HTML")); + 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( @@ -210,6 +212,10 @@ bool CreateChromeRegKeysForXP(HKEY root_key, const std::wstring& chrome_exe) { std::wstring html_prog_id = classes_path + L"\\" + ShellUtil::kChromeHTMLProgId; items->AddCreateRegKeyWorkItem(root_key, html_prog_id); + items->AddSetRegValueWorkItem(root_key, html_prog_id, + L"", ShellUtil::kChromeHTMLProgIdDesc, true); + items->AddSetRegValueWorkItem(root_key, html_prog_id, + ShellUtil::kRegUrlProtocol, L"", true); std::wstring default_icon = html_prog_id + ShellUtil::kRegDefaultIcon; items->AddCreateRegKeyWorkItem(root_key, default_icon); items->AddSetRegValueWorkItem(root_key, default_icon, L"", @@ -341,17 +347,16 @@ const wchar_t* ShellUtil::kRegStartMenuInternet = const wchar_t* ShellUtil::kRegClasses = L"Software\\Classes"; const wchar_t* ShellUtil::kRegRegisteredApplications = L"Software\\RegisteredApplications"; -const wchar_t* ShellUtil::kRegShellChromeHTML = L"\\shell\\ChromeHTML"; -const wchar_t* ShellUtil::kRegShellChromeHTMLCommand = - L"\\shell\\ChromeHTML\\command"; const wchar_t* ShellUtil::kRegVistaUrlPrefs = L"Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice"; const wchar_t* ShellUtil::kChromeHTMLProgId = L"ChromeHTML"; +const wchar_t* ShellUtil::kChromeHTMLProgIdDesc = L"Chrome HTML"; const wchar_t* ShellUtil::kFileAssociations[] = {L".htm", L".html", L".shtml", L".xht", L".xhtml", NULL}; const wchar_t* ShellUtil::kProtocolAssociations[] = {L"ftp", L"http", L"https", NULL}; +const wchar_t* ShellUtil::kRegUrlProtocol = L"URL Protocol"; ShellUtil::RegisterStatus ShellUtil::AddChromeToSetAccessDefaults( const std::wstring& chrome_exe, bool skip_if_not_admin) { diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h index ee7153a..5539729 100644 --- a/chrome/installer/util/shell_util.h +++ b/chrome/installer/util/shell_util.h @@ -57,13 +57,8 @@ class ShellUtil { // Name that we give to Chrome file association handler ProgId. static const wchar_t* kChromeHTMLProgId; - // Relative path of shell Chrome Progid in Windows registry - // (i.e. \\shell\\ChromeHTML). - static const wchar_t* kRegShellChromeHTML; - - // Relative path of shell Chrome Progid command in Windows registry - // (i.e. \\shell\\ChromeHTML\\command). - static const wchar_t* kRegShellChromeHTMLCommand; + // Description of Chrome file/URL association handler ProgId. + static const wchar_t* kChromeHTMLProgIdDesc; // Registry path that stores url associations on Vista. static const wchar_t* kRegVistaUrlPrefs; @@ -74,6 +69,9 @@ class ShellUtil { // Protocols that Chrome registers itself for. static const wchar_t* kProtocolAssociations[]; + // Registry value name that is needed for ChromeHTML ProgId + static const wchar_t* kRegUrlProtocol; + // This method adds Chrome to the list that shows up in Add/Remove Programs-> // Set Program Access and Defaults and also creates Chrome ProgIds under // Software\Classes. This method requires write access to HKLM so is just |