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

Side by Side Diff: chrome/browser/gpu_blacklist.cc

Issue 5905006: Revert 69490 - base/version: remove wstring version... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/gpu_blacklist.h" 5 #include "chrome/browser/gpu_blacklist.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h"
11 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
12 #include "base/sys_info.h" 11 #include "base/sys_info.h"
13 #include "base/values.h" 12 #include "base/values.h"
14 #include "base/version.h" 13 #include "base/version.h"
15 #include "chrome/common/gpu_info.h" 14 #include "chrome/common/gpu_info.h"
16 15
17 GpuBlacklist::VersionInfo::VersionInfo(const std::string& version_op, 16 GpuBlacklist::VersionInfo::VersionInfo(const std::string& version_op,
18 const std::string& version_string, 17 const std::string& version_string,
19 const std::string& version_string2) { 18 const std::string& version_string2) {
20 op_ = StringToOp(version_op); 19 op_ = StringToOp(version_op);
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 362
364 GpuFeatureFlags GpuBlacklist::DetermineGpuFeatureFlags( 363 GpuFeatureFlags GpuBlacklist::DetermineGpuFeatureFlags(
365 GpuBlacklist::OsType os, 364 GpuBlacklist::OsType os,
366 Version* os_version, 365 Version* os_version,
367 const GPUInfo& gpu_info) const { 366 const GPUInfo& gpu_info) const {
368 GpuFeatureFlags flags; 367 GpuFeatureFlags flags;
369 // No need to go through blacklist entries if GPUInfo isn't available. 368 // No need to go through blacklist entries if GPUInfo isn't available.
370 if (gpu_info.progress() == GPUInfo::kUninitialized) 369 if (gpu_info.progress() == GPUInfo::kUninitialized)
371 return flags; 370 return flags;
372 scoped_ptr<Version> driver_version( 371 scoped_ptr<Version> driver_version(
373 Version::GetVersionFromString(WideToASCII(gpu_info.driver_version()))); 372 Version::GetVersionFromString(gpu_info.driver_version()));
374 if (driver_version.get() == NULL) 373 if (driver_version.get() == NULL)
375 return flags; 374 return flags;
376 375
377 if (os == kOsAny) 376 if (os == kOsAny)
378 os = GetOsType(); 377 os = GetOsType();
379 scoped_ptr<Version> my_os_version; 378 scoped_ptr<Version> my_os_version;
380 if (os_version == NULL) { 379 if (os_version == NULL) {
381 std::string version_string; 380 std::string version_string;
382 #if defined(OS_MACOSX) 381 #if defined(OS_MACOSX)
383 // Seems like base::SysInfo::OperatingSystemVersion() returns the wrong 382 // Seems like base::SysInfo::OperatingSystemVersion() returns the wrong
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 return kOsUnknown; 417 return kOsUnknown;
419 #endif 418 #endif
420 } 419 }
421 420
422 void GpuBlacklist::Clear() { 421 void GpuBlacklist::Clear() {
423 for (size_t i = 0; i < blacklist_.size(); ++i) 422 for (size_t i = 0; i < blacklist_.size(); ++i)
424 delete blacklist_[i]; 423 delete blacklist_[i];
425 blacklist_.clear(); 424 blacklist_.clear();
426 } 425 }
427 426
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_registry_extension_provider_win.cc ('k') | chrome/browser/ui/views/about_chrome_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698