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

Unified Diff: base/timer/hi_res_timer_manager.h

Issue 2951413003: Add UMA for High Resolution Timer Usage (Closed)
Patch Set: Added suspend / resume logic Created 3 years, 6 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: base/timer/hi_res_timer_manager.h
diff --git a/base/timer/hi_res_timer_manager.h b/base/timer/hi_res_timer_manager.h
index 21cdfafb6ca844687d9135dd08e03b685926bafa..dced4dc64d2fd5e9cab4d503abcb09b91aa8e017 100644
--- a/base/timer/hi_res_timer_manager.h
+++ b/base/timer/hi_res_timer_manager.h
@@ -7,7 +7,9 @@
#include "base/base_export.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/power_monitor/power_observer.h"
+#include "base/sequenced_task_runner.h"
namespace base {
@@ -18,8 +20,10 @@ class BASE_EXPORT HighResolutionTimerManager : public base::PowerObserver {
HighResolutionTimerManager();
~HighResolutionTimerManager() override;
- // base::PowerObserver method.
+ // base::PowerObserver methods.
void OnPowerStateChange(bool on_battery_power) override;
+ void OnSuspend() override;
+ void OnResume() override;
// Returns true if the hi resolution clock could be used right now.
bool hi_res_clock_available() const { return hi_res_clock_available_; }

Powered by Google App Engine
This is Rietveld 408576698