| 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 "gpu/config/gpu_info_collector.h" | 5 #include "gpu/config/gpu_info_collector.h" |
| 6 | 6 |
| 7 // This has to be included before windows.h. | 7 // This has to be included before windows.h. |
| 8 #include "third_party/re2/re2/re2.h" | 8 #include "third_party/re2/re2/re2.h" |
| 9 | 9 |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // This must be kept in sync with histograms.xml. | 46 // This must be kept in sync with histograms.xml. |
| 47 enum DisplayLinkInstallationStatus { | 47 enum DisplayLinkInstallationStatus { |
| 48 DISPLAY_LINK_NOT_INSTALLED, | 48 DISPLAY_LINK_NOT_INSTALLED, |
| 49 DISPLAY_LINK_7_1_OR_EARLIER, | 49 DISPLAY_LINK_7_1_OR_EARLIER, |
| 50 DISPLAY_LINK_7_2_OR_LATER, | 50 DISPLAY_LINK_7_2_OR_LATER, |
| 51 DISPLAY_LINK_INSTALLATION_STATUS_MAX | 51 DISPLAY_LINK_INSTALLATION_STATUS_MAX |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 // Returns the display link driver version or an invalid version if it is | 54 // Returns the display link driver version or an invalid version if it is |
| 55 // not installed. | 55 // not installed. |
| 56 base::Version DisplayLinkVersion() { | 56 Version DisplayLinkVersion() { |
| 57 base::win::RegKey key; | 57 base::win::RegKey key; |
| 58 | 58 |
| 59 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY)) | 59 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY)) |
| 60 return base::Version(); | 60 return Version(); |
| 61 | 61 |
| 62 if (key.OpenKey(L"DisplayLink", KEY_READ | KEY_WOW64_64KEY)) | 62 if (key.OpenKey(L"DisplayLink", KEY_READ | KEY_WOW64_64KEY)) |
| 63 return base::Version(); | 63 return Version(); |
| 64 | 64 |
| 65 if (key.OpenKey(L"Core", KEY_READ | KEY_WOW64_64KEY)) | 65 if (key.OpenKey(L"Core", KEY_READ | KEY_WOW64_64KEY)) |
| 66 return base::Version(); | 66 return Version(); |
| 67 | 67 |
| 68 base::string16 version; | 68 base::string16 version; |
| 69 if (key.ReadValue(L"Version", &version)) | 69 if (key.ReadValue(L"Version", &version)) |
| 70 return base::Version(); | 70 return Version(); |
| 71 | 71 |
| 72 return base::Version(base::UTF16ToASCII(version)); | 72 return Version(base::UTF16ToASCII(version)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 // Returns whether Lenovo dCute is installed. | 75 // Returns whether Lenovo dCute is installed. |
| 76 bool IsLenovoDCuteInstalled() { | 76 bool IsLenovoDCuteInstalled() { |
| 77 base::win::RegKey key; | 77 base::win::RegKey key; |
| 78 | 78 |
| 79 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY)) | 79 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY)) |
| 80 return false; | 80 return false; |
| 81 | 81 |
| 82 if (key.OpenKey(L"Lenovo", KEY_READ | KEY_WOW64_64KEY)) | 82 if (key.OpenKey(L"Lenovo", KEY_READ | KEY_WOW64_64KEY)) |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 } | 493 } |
| 494 | 494 |
| 495 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 495 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
| 496 | 496 |
| 497 basic_gpu_info->dx_diagnostics_info_state = | 497 basic_gpu_info->dx_diagnostics_info_state = |
| 498 context_gpu_info.dx_diagnostics_info_state; | 498 context_gpu_info.dx_diagnostics_info_state; |
| 499 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; | 499 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace gpu | 502 } // namespace gpu |
| OLD | NEW |