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

Unified Diff: content/public/common/content_switches.cc

Issue 857123002: Disable Win32k renderer lockdown if DirectWrite is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cloudprint Created 5 years, 11 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
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))

Powered by Google App Engine
This is Rietveld 408576698