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

Unified Diff: content/renderer/pepper/plugin_instance_throttler_impl.cc

Issue 1024493004: Plugin Power Saver: Record PPS UMAs only for users with PPS enabled. (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: content/renderer/pepper/plugin_instance_throttler_impl.cc
diff --git a/content/renderer/pepper/plugin_instance_throttler_impl.cc b/content/renderer/pepper/plugin_instance_throttler_impl.cc
index 6a48a4d6e01c21a6cae5792dcb84d45955550473..a56481726f00d6d272e609cb04d8e8594629965d 100644
--- a/content/renderer/pepper/plugin_instance_throttler_impl.cc
+++ b/content/renderer/pepper/plugin_instance_throttler_impl.cc
@@ -37,9 +37,8 @@ const int kAudioThrottledFrameTimeoutMilliseconds = 500;
const int PluginInstanceThrottlerImpl::kMaximumFramesToExamine = 150;
// static
-scoped_ptr<PluginInstanceThrottler> PluginInstanceThrottler::Create(
- bool power_saver_enabled) {
- return make_scoped_ptr(new PluginInstanceThrottlerImpl(power_saver_enabled));
+scoped_ptr<PluginInstanceThrottler> PluginInstanceThrottler::Create() {
+ return make_scoped_ptr(new PluginInstanceThrottlerImpl);
}
// static
@@ -50,10 +49,8 @@ void PluginInstanceThrottler::RecordUnthrottleMethodMetric(
PluginInstanceThrottler::UNTHROTTLE_METHOD_NUM_ITEMS);
}
-PluginInstanceThrottlerImpl::PluginInstanceThrottlerImpl(
- bool power_saver_enabled)
- : state_(power_saver_enabled ? THROTTLER_STATE_AWAITING_KEYFRAME
- : THROTTLER_STATE_POWER_SAVER_DISABLED),
+PluginInstanceThrottlerImpl::PluginInstanceThrottlerImpl()
+ : state_(THROTTLER_STATE_AWAITING_KEYFRAME),
is_hidden_for_placeholder_(false),
web_plugin_(nullptr),
consecutive_interesting_frames_(0),

Powered by Google App Engine
This is Rietveld 408576698