Index: content/public/common/content_switches.cc |
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc |
index b9d93ed54bd75c3111b446ec2f86baeb8b8963ad..bdd63d319bee8e973c58f35a85e662374ad83601 100644 |
--- a/content/public/common/content_switches.cc |
+++ b/content/public/common/content_switches.cc |
@@ -6,6 +6,10 @@ |
#include "base/command_line.h" |
#include "base/metrics/field_trial.h" |
+#if defined(OS_WIN) |
+#include "base/win/windows_version.h" |
+#include "ui/gfx/switches.h" |
+#endif |
namespace switches { |
@@ -961,10 +965,14 @@ const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver"; |
#endif |
#if defined(OS_WIN) |
-bool IsWin32kRendererLockdownEnabled() { |
+bool IsWin32kRendererLockdownEnabled(bool ignore_directwrite) { |
cpu_(ooo_6.6-7.5)
2015/01/22 01:22:02
not loving this contract, I mean interface.
|
const std::string group_name = |
base::FieldTrialList::FindFullName("Win32kLockdown"); |
+ if (base::win::GetVersion() < base::win::VERSION_WIN8) |
+ return false; |
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
+ if (!ignore_directwrite && cmd_line->HasSwitch(switches::kDisableDirectWrite)) |
+ return false; |
if (cmd_line->HasSwitch(kEnableWin32kRendererLockDown)) |
return true; |
if (cmd_line->HasSwitch(kDisableWin32kRendererLockDown)) |