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

Unified Diff: chrome/renderer/plugins/chrome_plugin_placeholder.cc

Issue 2211753002: Plugin Power Saver Tiny: Fix Plugin.PowerSaver.PeripheralHeuristic UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge. and change to enum Created 4 years, 4 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/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/plugins/power_saver_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugins/chrome_plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 200de445f44c28d22efe190cdb84a4393806de8d..67f82bf8d0e7fe3f2180a6f32cf59210feb1fad5 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -383,7 +383,9 @@ blink::WebPlugin* ChromePluginPlaceholder::CreatePlugin() {
// If the plugin has already been marked essential in its placeholder form,
// we shouldn't create a new throttler and start the process all over again.
if (power_saver_enabled()) {
- throttler = content::PluginInstanceThrottler::Create();
+ throttler = content::PluginInstanceThrottler::Create(
+ heuristic_run_before_ ? content::RenderFrame::DONT_RECORD_DECISION
+ : content::RenderFrame::RECORD_DECISION);
// PluginPreroller manages its own lifetime.
new PluginPreroller(render_frame(), GetFrame(), GetPluginParams(),
GetPluginInfo(), GetIdentifier(), title_,
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/plugins/power_saver_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698