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

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

Issue 5848005: base/version: remove wstring version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: retry 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"
10 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
11 #include "base/sys_info.h" 12 #include "base/sys_info.h"
12 #include "base/values.h" 13 #include "base/values.h"
13 #include "base/version.h" 14 #include "base/version.h"
14 #include "chrome/common/gpu_info.h" 15 #include "chrome/common/gpu_info.h"
15 16
16 GpuBlacklist::VersionInfo::VersionInfo(const std::string& version_op, 17 GpuBlacklist::VersionInfo::VersionInfo(const std::string& version_op,
17 const std::string& version_string, 18 const std::string& version_string,
18 const std::string& version_string2) { 19 const std::string& version_string2) {
19 op_ = StringToOp(version_op); 20 op_ = StringToOp(version_op);
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 363
363 GpuFeatureFlags GpuBlacklist::DetermineGpuFeatureFlags( 364 GpuFeatureFlags GpuBlacklist::DetermineGpuFeatureFlags(
364 GpuBlacklist::OsType os, 365 GpuBlacklist::OsType os,
365 Version* os_version, 366 Version* os_version,
366 const GPUInfo& gpu_info) const { 367 const GPUInfo& gpu_info) const {
367 GpuFeatureFlags flags; 368 GpuFeatureFlags flags;
368 // No need to go through blacklist entries if GPUInfo isn't available. 369 // No need to go through blacklist entries if GPUInfo isn't available.
369 if (gpu_info.progress() == GPUInfo::kUninitialized) 370 if (gpu_info.progress() == GPUInfo::kUninitialized)
370 return flags; 371 return flags;
371 scoped_ptr<Version> driver_version( 372 scoped_ptr<Version> driver_version(
372 Version::GetVersionFromString(gpu_info.driver_version())); 373 Version::GetVersionFromString(WideToASCII(gpu_info.driver_version())));
373 if (driver_version.get() == NULL) 374 if (driver_version.get() == NULL)
374 return flags; 375 return flags;
375 376
376 if (os == kOsAny) 377 if (os == kOsAny)
377 os = GetOsType(); 378 os = GetOsType();
378 scoped_ptr<Version> my_os_version; 379 scoped_ptr<Version> my_os_version;
379 if (os_version == NULL) { 380 if (os_version == NULL) {
380 std::string version_string; 381 std::string version_string;
381 #if defined(OS_MACOSX) 382 #if defined(OS_MACOSX)
382 // Seems like base::SysInfo::OperatingSystemVersion() returns the wrong 383 // Seems like base::SysInfo::OperatingSystemVersion() returns the wrong
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 return kOsUnknown; 418 return kOsUnknown;
418 #endif 419 #endif
419 } 420 }
420 421
421 void GpuBlacklist::Clear() { 422 void GpuBlacklist::Clear() {
422 for (size_t i = 0; i < blacklist_.size(); ++i) 423 for (size_t i = 0; i < blacklist_.size(); ++i)
423 delete blacklist_[i]; 424 delete blacklist_[i];
424 blacklist_.clear(); 425 blacklist_.clear();
425 } 426 }
426 427
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