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

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

Issue 109673004: Revert "Update all users of base::Version to explicitly specify the namespace, and clean up the hea… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« 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/re2/re2.h" 8 #include "third_party/re2/re2/re2.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 stats.gaming * 10, 10, 200, 50); 163 stats.gaming * 10, 10, 200, 50);
164 UMA_HISTOGRAM_BOOLEAN( 164 UMA_HISTOGRAM_BOOLEAN(
165 "GPU.WinSAT.HasResults", 165 "GPU.WinSAT.HasResults",
166 stats.overall != 0.0 && stats.graphics != 0.0 && stats.gaming != 0.0); 166 stats.overall != 0.0 && stats.graphics != 0.0 && stats.gaming != 0.0);
167 167
168 return stats; 168 return stats;
169 } 169 }
170 170
171 // Returns the display link driver version or an invalid version if it is 171 // Returns the display link driver version or an invalid version if it is
172 // not installed. 172 // not installed.
173 base::Version DisplayLinkVersion() { 173 Version DisplayLinkVersion() {
174 base::win::RegKey key; 174 base::win::RegKey key;
175 175
176 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY)) 176 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY))
177 return base::Version(); 177 return Version();
178 178
179 if (key.OpenKey(L"DisplayLink", KEY_READ | KEY_WOW64_64KEY)) 179 if (key.OpenKey(L"DisplayLink", KEY_READ | KEY_WOW64_64KEY))
180 return base::Version(); 180 return Version();
181 181
182 if (key.OpenKey(L"Core", KEY_READ | KEY_WOW64_64KEY)) 182 if (key.OpenKey(L"Core", KEY_READ | KEY_WOW64_64KEY))
183 return base::Version(); 183 return Version();
184 184
185 base::string16 version; 185 base::string16 version;
186 if (key.ReadValue(L"Version", &version)) 186 if (key.ReadValue(L"Version", &version))
187 return base::Version(); 187 return Version();
188 188
189 return base::Version(WideToASCII(version)); 189 return Version(WideToASCII(version));
190 } 190 }
191 191
192 // Returns whether Lenovo dCute is installed. 192 // Returns whether Lenovo dCute is installed.
193 bool IsLenovoDCuteInstalled() { 193 bool IsLenovoDCuteInstalled() {
194 base::win::RegKey key; 194 base::win::RegKey key;
195 195
196 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY)) 196 if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE", KEY_READ | KEY_WOW64_64KEY))
197 return false; 197 return false;
198 198
199 if (key.OpenKey(L"Lenovo", KEY_READ | KEY_WOW64_64KEY)) 199 if (key.OpenKey(L"Lenovo", KEY_READ | KEY_WOW64_64KEY))
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 basic_gpu_info->software_rendering = true; 644 basic_gpu_info->software_rendering = true;
645 return; 645 return;
646 } 646 }
647 647
648 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 648 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
649 649
650 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; 650 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics;
651 } 651 }
652 652
653 } // namespace gpu 653 } // 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