OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/win/win_util.h" | 5 #include "base/win/win_util.h" |
6 | 6 |
7 #include <aclapi.h> | 7 #include <aclapi.h> |
8 #include <cfgmgr32.h> | 8 #include <cfgmgr32.h> |
9 #include <lm.h> | 9 #include <lm.h> |
10 #include <powrprof.h> | 10 #include <powrprof.h> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const ScopedPropVariant& property_value) { | 47 const ScopedPropVariant& property_value) { |
48 DCHECK(property_store); | 48 DCHECK(property_store); |
49 | 49 |
50 HRESULT result = property_store->SetValue(property_key, property_value.get()); | 50 HRESULT result = property_store->SetValue(property_key, property_value.get()); |
51 if (result == S_OK) | 51 if (result == S_OK) |
52 result = property_store->Commit(); | 52 result = property_store->Commit(); |
53 return SUCCEEDED(result); | 53 return SUCCEEDED(result); |
54 } | 54 } |
55 | 55 |
56 void __cdecl ForceCrashOnSigAbort(int) { | 56 void __cdecl ForceCrashOnSigAbort(int) { |
57 *((int*)0) = 0x1337; | 57 *((volatile int*)0) = 0x1337; |
58 } | 58 } |
59 | 59 |
60 const wchar_t kWindows8OSKRegPath[] = | 60 const wchar_t kWindows8OSKRegPath[] = |
61 L"Software\\Classes\\CLSID\\{054AAE20-4BEA-4347-8A35-64A533254A9D}" | 61 L"Software\\Classes\\CLSID\\{054AAE20-4BEA-4347-8A35-64A533254A9D}" |
62 L"\\LocalServer32"; | 62 L"\\LocalServer32"; |
63 | 63 |
64 } // namespace | 64 } // namespace |
65 | 65 |
66 // Returns true if a physical keyboard is detected on Windows 8 and up. | 66 // Returns true if a physical keyboard is detected on Windows 8 and up. |
67 // Uses the Setup APIs to enumerate the attached keyboards and returns true | 67 // Uses the Setup APIs to enumerate the attached keyboards and returns true |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 // deployed. | 527 // deployed. |
528 if (os_info->version() == VERSION_SERVER_2003) | 528 if (os_info->version() == VERSION_SERVER_2003) |
529 return false; | 529 return false; |
530 | 530 |
531 DCHECK(os_info->version() >= VERSION_VISTA); | 531 DCHECK(os_info->version() >= VERSION_VISTA); |
532 return true; // New enough to have SHA-256 support. | 532 return true; // New enough to have SHA-256 support. |
533 } | 533 } |
534 | 534 |
535 } // namespace win | 535 } // namespace win |
536 } // namespace base | 536 } // namespace base |
OLD | NEW |