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

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

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.h
diff --git a/content/renderer/pepper/plugin_instance_throttler_impl.h b/content/renderer/pepper/plugin_instance_throttler_impl.h
index 0bcad2f60dcade53727b175c2fac0b4ac3694803..54f17cfff9bdae5ac0f868fa777ef378d5fe78d2 100644
--- a/content/renderer/pepper/plugin_instance_throttler_impl.h
+++ b/content/renderer/pepper/plugin_instance_throttler_impl.h
@@ -26,7 +26,7 @@ class RenderFrameImpl;
class CONTENT_EXPORT PluginInstanceThrottlerImpl
: public PluginInstanceThrottler {
public:
- PluginInstanceThrottlerImpl(bool power_saver_enabled);
+ PluginInstanceThrottlerImpl();
~PluginInstanceThrottlerImpl() override;
@@ -47,8 +47,7 @@ class CONTENT_EXPORT PluginInstanceThrottlerImpl
}
bool power_saver_enabled() const {
- return state_ == THROTTLER_STATE_AWAITING_KEYFRAME ||
- state_ == THROTTLER_STATE_PLUGIN_THROTTLED;
+ return state_ != THROTTLER_STATE_MARKED_ESSENTIAL;
}
// Throttler needs to be initialized with the real plugin's view bounds.
@@ -68,8 +67,6 @@ class CONTENT_EXPORT PluginInstanceThrottlerImpl
friend class PluginInstanceThrottlerImplTest;
enum ThrottlerState {
- // Power saver is disabled, but the plugin instance is still peripheral.
- THROTTLER_STATE_POWER_SAVER_DISABLED,
// Plugin has been found to be peripheral, Plugin Power Saver is enabled,
// and throttler is awaiting a representative keyframe.
THROTTLER_STATE_AWAITING_KEYFRAME,
« no previous file with comments | « content/public/renderer/plugin_instance_throttler.h ('k') | content/renderer/pepper/plugin_instance_throttler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698