diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 19:52:10 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 19:52:10 +0000 |
commit | 73e53af0d3cfcc24eebd1238460c69356b86d325 (patch) | |
tree | bf703d290f308905d805631a3bd5e740ab334f76 /chrome | |
parent | 9d7bc25cd82631604aaa534a383f38d31c8f8d1f (diff) | |
download | chromium_src-73e53af0d3cfcc24eebd1238460c69356b86d325.zip chromium_src-73e53af0d3cfcc24eebd1238460c69356b86d325.tar.gz chromium_src-73e53af0d3cfcc24eebd1238460c69356b86d325.tar.bz2 |
* Fix Chrome browser not launching when set as default browser.
Looks like Desktop (and probably new Talk as well) verify for the existence of "URL Protocol" value before using Chrome command to launch browser (see b/1326171).
BUG=1386406
Review URL: http://codereview.chromium.org/13117
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6376 0039d316-1c4b-4281-b951-d872f2087c98
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 |