Commit f3c163fb authored by tommycli's avatar tommycli Committed by Commit bot

Plugin Power Saver: --enable-plugin-power-saver only overrides ALLOW.

--enable-plugin-power-saver flag previously overrode anything in the
content settings flag. This breaks for BLOCK setting and unauthorized
plugins, as the browser side needs to authorize the plugin first.

This patch restricts the flag to only impact users on ALLOW. This makes
sense to me, as the flag should not decrease the security of users
who have explicitly chosen ASK or BLOCK.

It will also dodge the bug.

BUG=448171,403800

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

Cr-Commit-Position: refs/heads/master@{#313210}
parent 2e25142f
......@@ -702,7 +702,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
}
#if defined(ENABLE_PLUGINS)
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed &&
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePluginPowerSaver)) {
status_value =
ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent;
......
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