Index: chrome/renderer/chrome_content_renderer_client.cc |
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc |
index be1dcf7fcc90682c92479dec688fe5e547b883b2..fd8e8e6def75008921d9902e58e193b3a60915eb 100644 |
--- a/chrome/renderer/chrome_content_renderer_client.cc |
+++ b/chrome/renderer/chrome_content_renderer_client.cc |
@@ -759,19 +759,13 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( |
status_value = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed; |
} |
-#if defined(ENABLE_PLUGINS) |
- if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed && |
- base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnablePluginPowerSaver)) { |
- status_value = |
- ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent; |
- } |
-#endif |
- |
#if defined(OS_WIN) |
// In Windows we need to check if we can load NPAPI plugins. |
// For example, if the render view is in the Ash desktop, we should not. |
- if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed && |
+ // If user is on ALLOW or DETECT setting, loading needs to be blocked here. |
+ if ((status_value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed || |
+ status_value == |
+ ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent) && |
info.type == content::WebPluginInfo::PLUGIN_TYPE_NPAPI) { |
if (observer->AreNPAPIPluginsBlocked()) |
status_value = |