diff options
author | jschuh <jschuh@chromium.org> | 2015-07-12 15:58:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-12 22:59:32 +0000 |
commit | fc77a6768cbcb7de3c22f77df6e58619bed6236a (patch) | |
tree | 665dc80be5c5073f161f54c3f7e943b84e40041b /base/win | |
parent | a66cb71064d8e3cb271303624e053f66c92f7878 (diff) | |
download | chromium_src-fc77a6768cbcb7de3c22f77df6e58619bed6236a.zip chromium_src-fc77a6768cbcb7de3c22f77df6e58619bed6236a.tar.gz chromium_src-fc77a6768cbcb7de3c22f77df6e58619bed6236a.tar.bz2 |
Check Windows version before attempting to detect OSK
Fixes a crash on delay load failure for older Windows versions.
BUG=507490,491516
TBR=grt
Review URL: https://codereview.chromium.org/1229103003
Cr-Commit-Position: refs/heads/master@{#338457}
Diffstat (limited to 'base/win')
-rw-r--r-- | base/win/win_util.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/win/win_util.cc b/base/win/win_util.cc index 72af88f..96d646a 100644 --- a/base/win/win_util.cc +++ b/base/win/win_util.cc @@ -71,6 +71,11 @@ const wchar_t kWindows8OSKRegPath[] = bool IsKeyboardPresentOnSlate(std::string* reason) { bool result = false; + if (GetVersion() < VERSION_WIN7) { + *reason = "Detection not supported"; + return false; + } + // This function is only supported for Windows 8 and up. if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableUsbKeyboardDetect)) { |