Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: gpu/config/gpu_info_collector_win.cc

Issue 2258273002: Consistently use namespaced base::Version in gpu/ code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/config/gpu_info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/src/re2/re2.h" 8 #include "third_party/re2/src/re2/re2.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // This must be kept in sync with histograms.xml. 48 // This must be kept in sync with histograms.xml.
49 enum DisplayLinkInstallationStatus { 49 enum DisplayLinkInstallationStatus {
50 DISPLAY_LINK_NOT_INSTALLED, 50 DISPLAY_LINK_NOT_INSTALLED,
51 DISPLAY_LINK_7_1_OR_EARLIER, 51 DISPLAY_LINK_7_1_OR_EARLIER,
52 DISPLAY_LINK_7_2_OR_LATER, 52 DISPLAY_LINK_7_2_OR_LATER,
53 DISPLAY_LINK_INSTALLATION_STATUS_MAX 53 DISPLAY_LINK_INSTALLATION_STATUS_MAX
54 }; 54 };
55 55
56 // Returns the display link driver version or an invalid version if it is 56 // Returns the display link driver version or an invalid version if it is
57 // not installed. 57 // not installed.
58 Version DisplayLinkVersion() { 58 base::Version DisplayLinkVersion() {
59 base::win::RegKey key; 59 base::win::RegKey key;
60 60
61 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY)) 61 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY))
62 return Version(); 62 return base::Version();
63 63
64 if (key.OpenKey(L"DisplayLink", KEY_READ | KEY_WOW64_64KEY)) 64 if (key.OpenKey(L"DisplayLink", KEY_READ | KEY_WOW64_64KEY))
65 return Version(); 65 return base::Version();
66 66
67 if (key.OpenKey(L"Core", KEY_READ | KEY_WOW64_64KEY)) 67 if (key.OpenKey(L"Core", KEY_READ | KEY_WOW64_64KEY))
68 return Version(); 68 return base::Version();
69 69
70 base::string16 version; 70 base::string16 version;
71 if (key.ReadValue(L"Version", &version)) 71 if (key.ReadValue(L"Version", &version))
72 return Version(); 72 return base::Version();
73 73
74 return Version(base::UTF16ToASCII(version)); 74 return base::Version(base::UTF16ToASCII(version));
75 } 75 }
76 76
77 // Returns whether Lenovo dCute is installed. 77 // Returns whether Lenovo dCute is installed.
78 bool IsLenovoDCuteInstalled() { 78 bool IsLenovoDCuteInstalled() {
79 base::win::RegKey key; 79 base::win::RegKey key;
80 80
81 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY)) 81 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY))
82 return false; 82 return false;
83 83
84 if (key.OpenKey(L"Lenovo", KEY_READ | KEY_WOW64_64KEY)) 84 if (key.OpenKey(L"Lenovo", KEY_READ | KEY_WOW64_64KEY))
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 } 494 }
495 495
496 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 496 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
497 497
498 basic_gpu_info->dx_diagnostics_info_state = 498 basic_gpu_info->dx_diagnostics_info_state =
499 context_gpu_info.dx_diagnostics_info_state; 499 context_gpu_info.dx_diagnostics_info_state;
500 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; 500 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics;
501 } 501 }
502 502
503 } // namespace gpu 503 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698