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

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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698