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

Unified Diff: content/browser/gpu/gpu_blacklist.cc

Issue 10908110: Move gpu blacklist to content side. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_blacklist.h ('k') | content/browser/gpu/gpu_blacklist_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_blacklist.cc
===================================================================
--- content/browser/gpu/gpu_blacklist.cc (revision 154773)
+++ content/browser/gpu/gpu_blacklist.cc (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/gpu_blacklist.h"
+#include "content/browser/gpu/gpu_blacklist.h"
#include "base/command_line.h"
#include "base/json/json_reader.h"
@@ -12,13 +12,10 @@
#include "base/string_util.h"
#include "base/sys_info.h"
#include "base/version.h"
-#include "chrome/browser/gpu_util.h"
-#include "chrome/common/chrome_version_info.h"
-#include "content/public/browser/gpu_data_manager.h"
+#include "content/browser/gpu/gpu_util.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/gpu_info.h"
-using content::GpuDataManager;
using content::GpuFeatureType;
namespace {
@@ -919,28 +916,19 @@
return feature_type_;
}
-// static
-GpuBlacklist* GpuBlacklist::GetInstance() {
- return Singleton<GpuBlacklist>::get();
-}
-
GpuBlacklist::GpuBlacklist()
: max_entry_id_(0),
contains_unknown_fields_(false) {
- GpuDataManager::GetInstance()->AddObserver(this);
}
GpuBlacklist::~GpuBlacklist() {
Clear();
- GpuDataManager::GetInstance()->RemoveObserver(this);
}
bool GpuBlacklist::LoadGpuBlacklist(
const std::string& json_context, GpuBlacklist::OsFilter os_filter) {
- chrome::VersionInfo chrome_version_info;
- std::string chrome_version_string =
- chrome_version_info.is_valid() ? chrome_version_info.Version() : "0";
- return LoadGpuBlacklist(chrome_version_string, json_context, os_filter);
+ const std::string browser_version_string = "0";
+ return LoadGpuBlacklist(browser_version_string, json_context, os_filter);
}
bool GpuBlacklist::LoadGpuBlacklist(
@@ -1050,14 +1038,6 @@
return static_cast<GpuFeatureType>(type);
}
-void GpuBlacklist::UpdateGpuDataManager() {
- content::GpuFeatureType feature_type = DetermineGpuFeatureType(
- GpuBlacklist::kOsAny, NULL, GpuDataManager::GetInstance()->GetGPUInfo());
- GpuDataManager::GetInstance()->SetPreliminaryBlacklistedFeatures(
- feature_type);
- gpu_util::UpdateStats();
-}
-
void GpuBlacklist::GetGpuFeatureTypeEntries(
content::GpuFeatureType feature,
std::vector<uint32>& entry_ids,
@@ -1163,10 +1143,6 @@
return kSupported;
}
-void GpuBlacklist::OnGpuInfoUpdate() {
- UpdateGpuDataManager();
-}
-
// static
GpuBlacklist::NumericOp GpuBlacklist::StringToNumericOp(
const std::string& op) {
« no previous file with comments | « content/browser/gpu/gpu_blacklist.h ('k') | content/browser/gpu/gpu_blacklist_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698