Commit 945de9d8 authored by wfh's avatar wfh Committed by Commit bot

Remove Win32k fieldtrial, flag and switches, and make default enabled.

Since the default is now always enabled, remove the test that specifically tests renderers can operate with the switch enabled.

BUG=365160

Review URL: https://codereview.chromium.org/1133243003

Cr-Commit-Position: refs/heads/master@{#329684}
parent 938b3c00
......@@ -5776,12 +5776,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION" desc="Description of the 'Disable DirectWrite' lab.">
Disables the use of experimental DirectWrite font rendering system.
</message>
<message name="IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_NAME" desc="Name of the 'Enable win32k renderer lockdown' lab.">
Enable win32k renderer lockdown
</message>
<message name="IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_DESCRIPTION" desc="Description of the 'Enable win32k renderer lockdown' lab.">
Enables the win32k renderer lockdown, which is only available on Windows 8 and above.
</message>
</if>
<if expr="is_win or is_macosx">
<message name="IDS_FLAGS_ENABLE_NPAPI_NAME" desc="Name of the 'Enable NPAPI' lab.">
......@@ -570,14 +570,6 @@ const Experiment kExperiments[] = {
kOsWin,
SINGLE_VALUE_TYPE(switches::kDisableDirectWrite)
},
{
"enable-win32k-renderer-lockdown",
IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_NAME,
IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_DESCRIPTION,
kOsWin,
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableWin32kRendererLockDown,
switches::kDisableWin32kRendererLockDown)
},
#endif
{
"enable-experimental-canvas-features",
......
......@@ -197,42 +197,5 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest,
}
}
#if defined(OS_WIN)
// Provides functionality to test renderer processes with the Win32K lockdown
// process mitigation.
class Win32KLockdownRendererProcessHostTest : public RenderProcessHostTest {
public:
Win32KLockdownRendererProcessHostTest() {}
~Win32KLockdownRendererProcessHostTest() override {}
protected:
void SetUp() override {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitch(switches::kEnableWin32kRendererLockDown);
RenderProcessHostTest::SetUp();
}
private:
DISALLOW_COPY_AND_ASSIGN(Win32KLockdownRendererProcessHostTest);
};
// Tests whether navigation requests with the Win32K lockdown mitigation set
// work correctly.
IN_PROC_BROWSER_TEST_F(Win32KLockdownRendererProcessHostTest,
RendererWin32KLockdownNavigationTest) {
if (base::win::GetVersion() < base::win::VERSION_WIN8)
return;
ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
GURL test_url = embedded_test_server()->GetURL("/simple_page.html");
NavigateToURL(shell(), test_url);
EXPECT_EQ(1, RenderProcessHostCount());
EXPECT_EQ(0, process_exits_);
}
#endif
} // namespace
} // namespace content
......@@ -1372,7 +1372,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
#endif
#if defined(OS_WIN)
switches::kDisableDirectWrite,
switches::kEnableWin32kRendererLockDown,
switches::kDisableWin32kRendererLockDown,
switches::kTraceExportEventsToETW,
#endif
......
......@@ -50,8 +50,6 @@ void DisableWin32kRendererLockdown() {
}
bool IsWin32kRendererLockdownEnabled() {
const std::string group_name =
base::FieldTrialList::FindFullName("Win32kLockdown");
if (g_win32k_renderer_lockdown_disabled)
return false;
if (base::win::GetVersion() < base::win::VERSION_WIN8)
......@@ -59,12 +57,9 @@ bool IsWin32kRendererLockdownEnabled() {
if (!gfx::win::ShouldUseDirectWrite())
return false;
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (cmd_line->HasSwitch(switches::kEnableWin32kRendererLockDown))
return true;
if (cmd_line->HasSwitch(switches::kDisableWin32kRendererLockDown))
return false;
// Default.
return group_name != "Disabled";
return true;
}
#endif
......
......@@ -984,13 +984,9 @@ const char kDeviceScaleFactor[] = "device-scale-factor";
// Disable the Legacy Window which corresponds to the size of the WebContents.
const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
// Enables or disables the Win32K process mitigation policy for renderer
// processes which prevents them from invoking user32 and gdi32 system calls
// which enter the kernel. This is only supported on Windows 8 and beyond.
// Disables the Win32K process mitigation policy for renderer processes.
const char kDisableWin32kRendererLockDown[] =
"disable-win32k-renderer-lockdown";
const char kEnableWin32kRendererLockDown[] =
"enable-win32k-renderer-lockdown";
// DirectWrite FontCache is shared by browser to renderers using shared memory.
// This switch allows us to pass the shared memory handle to the renderer.
......
......@@ -291,10 +291,7 @@ extern const char kDisableThreadedEventHandlingMac[];
// like renderers, etc.
CONTENT_EXPORT extern const char kDeviceScaleFactor[];
CONTENT_EXPORT extern const char kDisableLegacyIntermediateWindow[];
// This switch will be removed when we enable the win32K lockdown process
// mitigation.
CONTENT_EXPORT extern const char kDisableWin32kRendererLockDown[];
CONTENT_EXPORT extern const char kEnableWin32kRendererLockDown[];
CONTENT_EXPORT extern const char kMemoryPressureThresholdsMb[];
// Switch to pass the font cache shared memory handle to the renderer.
CONTENT_EXPORT extern const char kFontCacheSharedHandle[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment