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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1033103002: Plugin Power Saver: Overhaul plugin-power-saver flags. Show in UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: 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..7d0cf3d3bdb7bca98bff88a47b8ff6a39d14335c 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -759,19 +759,12 @@ 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 ((status_value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed ||
+ status_value ==
+ ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent) &&
Lei Zhang 2015/03/30 18:45:31 Can you add a comment to explain why this is here?
tommycli 2015/03/30 18:59:43 Done.
info.type == content::WebPluginInfo::PLUGIN_TYPE_NPAPI) {
if (observer->AreNPAPIPluginsBlocked())
status_value =

Powered by Google App Engine
This is Rietveld 408576698