summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authornick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-26 00:04:48 +0000
committernick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-26 00:04:48 +0000
commit144259d6f653fe03ec889d24605e60a00e5a28a0 (patch)
tree7f776c0dd209af6626f75d0f07be9251a19d2970 /content
parent54ba4a8cd61e1e5ad659ea6b3ef59c909654ce0c (diff)
downloadchromium_src-144259d6f653fe03ec889d24605e60a00e5a28a0.zip
chromium_src-144259d6f653fe03ec889d24605e60a00e5a28a0.tar.gz
chromium_src-144259d6f653fe03ec889d24605e60a00e5a28a0.tar.bz2
[Reason for revert: might be a factor in XP-only failures UITestCanLaunchWithOSMesa. Will unrevert if proven innocent.]
Revert 76075 - With this CL, GPU blacklist auto update from the web (before it ships together with chrome) is implemented. This allows us to blacklist bad GPU/drivers as soon as we discover them. Note that this patch does not turn the auto update on. We will turn it on in a separate CL. BUG=68802 TEST=build bots all green Review URL: http://codereview.chromium.org/6469094 TBR=zmo@google.com Review URL: http://codereview.chromium.org/6599020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/gpu_blacklist.cc31
-rw-r--r--content/browser/gpu_blacklist.h7
2 files changed, 3 insertions, 35 deletions
diff --git a/content/browser/gpu_blacklist.cc b/content/browser/gpu_blacklist.cc
index 771de1d..544a656 100644
--- a/content/browser/gpu_blacklist.cc
+++ b/content/browser/gpu_blacklist.cc
@@ -426,6 +426,7 @@ GpuBlacklist::~GpuBlacklist() {
bool GpuBlacklist::LoadGpuBlacklist(const std::string& json_context,
bool current_os_only) {
+ std::vector<GpuBlacklistEntry*> entries;
scoped_ptr<Value> root;
root.reset(base::JSONReader::Read(json_context, false));
if (root.get() == NULL || !root->IsType(Value::TYPE_DICTIONARY))
@@ -433,21 +434,14 @@ bool GpuBlacklist::LoadGpuBlacklist(const std::string& json_context,
DictionaryValue* root_dictionary = static_cast<DictionaryValue*>(root.get());
DCHECK(root_dictionary);
- return LoadGpuBlacklist(*root_dictionary, current_os_only);
-}
-
-bool GpuBlacklist::LoadGpuBlacklist(const DictionaryValue& parsed_json,
- bool current_os_only) {
- std::vector<GpuBlacklistEntry*> entries;
-
std::string version_string;
- parsed_json.GetString("version", &version_string);
+ root_dictionary->GetString("version", &version_string);
version_.reset(Version::GetVersionFromString(version_string));
if (version_.get() == NULL)
return false;
ListValue* list = NULL;
- parsed_json.GetList("entries", &list);
+ root_dictionary->GetList("entries", &list);
if (list == NULL)
return false;
@@ -562,25 +556,6 @@ bool GpuBlacklist::GetVersion(uint16* major, uint16* minor) const {
return true;
}
-bool GpuBlacklist::GetVersion(
- const DictionaryValue& parsed_json, uint16* major, uint16* minor) {
- DCHECK(major && minor);
- *major = 0;
- *minor = 0;
- std::string version_string;
- if (!parsed_json.GetString("version", &version_string))
- return false;
- scoped_ptr<Version> version(Version::GetVersionFromString(version_string));
- if (version.get() == NULL)
- return false;
- const std::vector<uint16>& components_reference = version->components();
- if (components_reference.size() != 2)
- return false;
- *major = components_reference[0];
- *minor = components_reference[1];
- return true;
-}
-
GpuBlacklist::OsType GpuBlacklist::GetOsType() {
#if defined(OS_WIN)
return kOsWin;
diff --git a/content/browser/gpu_blacklist.h b/content/browser/gpu_blacklist.h
index 7758b65..f732af9 100644
--- a/content/browser/gpu_blacklist.h
+++ b/content/browser/gpu_blacklist.h
@@ -37,8 +37,6 @@ class GpuBlacklist {
// If failed, the current GpuBlacklist is un-touched.
bool LoadGpuBlacklist(const std::string& json_context,
bool current_os_only);
- bool LoadGpuBlacklist(const DictionaryValue& parsed_json,
- bool current_os_only);
// Collects system information and combines them with gpu_info and blacklist
// information to determine gpu feature flags.
@@ -65,11 +63,6 @@ class GpuBlacklist {
// major and minor to 0 on failure.
bool GetVersion(uint16* major, uint16* monir) const;
- // Collects the version of the current blacklist from a parsed json file.
- // Returns false and sets major and minor to 0 on failure.
- static bool GetVersion(
- const DictionaryValue& parsed_json, uint16* major, uint16* minor);
-
private:
class VersionInfo {
public: