diff options
Diffstat (limited to 'chrome/installer/util')
-rw-r--r-- | chrome/installer/util/shell_util.cc | 15 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.h | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index 4f97cd6..ba8c0fe 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -11,7 +11,7 @@ #include <shellapi.h> #include <shlobj.h> -#include "shell_util.h" +#include "chrome/installer/util/shell_util.h" #include "base/file_util.h" #include "base/logging.h" @@ -57,6 +57,17 @@ class RegistryEntry { entries.push_front(new RegistryEntry( L"Software\\Classes\\ChromeHTML\\shell\\open\\command", open_cmd)); + std::wstring exe_name = file_util::GetFilenameFromPath(chrome_exe); + std::wstring app_key = L"Software\\Classes\\Applications\\" + exe_name + + L"\\shell\\open\\command"; + entries.push_front(new RegistryEntry(app_key, open_cmd)); + for (int i = 0; ShellUtil::kFileAssociations[i] != NULL; i++) { + std::wstring open_with_key(L"Software\\Classes\\"); + open_with_key.append(ShellUtil::kFileAssociations[i]); + open_with_key.append(L"\\OpenWithList\\" + exe_name); + entries.push_front(new RegistryEntry(open_with_key, std::wstring())); + } + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); entries.push_front(new RegistryEntry( L"Software\\Clients\\StartMenuInternet\\chrome.exe", @@ -333,6 +344,8 @@ const wchar_t* ShellUtil::kRegRegisteredApplications = 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::kFileAssociations[] = {L".htm", L".html", L".shtml", diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h index bdf77a19..ee7153a 100644 --- a/chrome/installer/util/shell_util.h +++ b/chrome/installer/util/shell_util.h @@ -65,6 +65,9 @@ class ShellUtil { // (i.e. \\shell\\ChromeHTML\\command). static const wchar_t* kRegShellChromeHTMLCommand; + // Registry path that stores url associations on Vista. + static const wchar_t* kRegVistaUrlPrefs; + // File extensions that Chrome registers itself for. static const wchar_t* kFileAssociations[]; |