Index: chrome/browser/platform_util_win.cc |
diff --git a/chrome/browser/platform_util_win.cc b/chrome/browser/platform_util_win.cc |
index 84282394fc82cbb3adcf2a2fd232c0c8396c43f0..bca98ac4049e42cf1e866731dedd49b650c2d06c 100644 |
--- a/chrome/browser/platform_util_win.cc |
+++ b/chrome/browser/platform_util_win.cc |
@@ -21,7 +21,6 @@ |
#include "base/win/registry.h" |
#include "base/win/scoped_co_mem.h" |
#include "base/win/scoped_comptr.h" |
-#include "base/win/windows_version.h" |
#include "chrome/browser/lifetime/application_lifetime.h" |
#include "chrome/browser/platform_util_internal.h" |
#include "content/public/browser/browser_thread.h" |
@@ -110,22 +109,6 @@ void ShowItemInFolderOnFileThread(const base::FilePath& full_path) { |
} |
} |
-// Old ShellExecute crashes the process when the command for a given scheme |
-// is empty. This function tells if it is. |
-bool ValidateShellCommandForScheme(const std::string& scheme) { |
- base::win::RegKey key; |
- base::string16 registry_path = base::ASCIIToUTF16(scheme) + |
- L"\\shell\\open\\command"; |
- key.Open(HKEY_CLASSES_ROOT, registry_path.c_str(), KEY_READ); |
- if (!key.Valid()) |
- return false; |
- DWORD size = 0; |
- key.ReadValue(NULL, NULL, &size, NULL); |
- if (size <= 2) |
- return false; |
- return true; |
-} |
- |
void OpenExternalOnFileThread(const GURL& url) { |
// Quote the input scheme to be sure that the command does not have |
// parameters unexpected by the external program. This url should already |
@@ -144,11 +127,6 @@ void OpenExternalOnFileThread(const GURL& url) { |
return; |
} |
- if (base::win::GetVersion() < base::win::VERSION_WIN7) { |
- if (!ValidateShellCommandForScheme(url.scheme())) |
- return; |
- } |
- |
if (reinterpret_cast<ULONG_PTR>(ShellExecuteA(NULL, "open", |
escaped_url.c_str(), NULL, NULL, |
SW_SHOWNORMAL)) <= 32) { |