Index: gpu/config/gpu_control_list.cc |
diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc |
index a59d3ebd05487a44c455e3f2b149ed7e7a22ec45..ccbb621acfb7b51480a36dba15f897459a092036 100644 |
--- a/gpu/config/gpu_control_list.cc |
+++ b/gpu/config/gpu_control_list.cc |
@@ -7,6 +7,7 @@ |
#include <stddef.h> |
#include <stdint.h> |
+#include "base/command_line.h" |
#include "base/cpu.h" |
#include "base/json/json_reader.h" |
#include "base/logging.h" |
@@ -16,6 +17,7 @@ |
#include "base/strings/stringprintf.h" |
#include "base/sys_info.h" |
#include "gpu/config/gpu_info.h" |
+#include "gpu/config/gpu_switches.h" |
#include "gpu/config/gpu_util.h" |
#include "third_party/re2/src/re2/re2.h" |
@@ -1431,6 +1433,11 @@ std::set<int> GpuControlList::MakeDecision( |
if (os_version.empty()) |
os_version = base::SysInfo::OperatingSystemVersion(); |
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
Zhenyao Mo
2016/01/29 22:40:35
I disagree with this method of hacking all over th
|
+ if (command_line->HasSwitch(switches::kGpuTestingOsVersion)) |
+ os_version = |
+ command_line->GetSwitchValueASCII(switches::kGpuTestingOsVersion); |
+ |
for (size_t i = 0; i < entries_.size(); ++i) { |
ScopedGpuControlListEntry entry = entries_[i]; |
if (entry->Contains(os, os_version, gpu_info)) { |