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

Unified Diff: content/browser/power_profiler/power_profiler_service_unittest.cc

Issue 309803002: [PowerProfiler] Power Profiler service should detect the sampling rate from the data provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « content/browser/power_profiler/power_profiler_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/power_profiler/power_profiler_service_unittest.cc
diff --git a/content/browser/power_profiler/power_profiler_service_unittest.cc b/content/browser/power_profiler/power_profiler_service_unittest.cc
index 9c4eb21cdfe26246f4d5d33fa35f906c8553e175..f7f77dc82dd6acaa2e60e09636c8c13758a78995 100644
--- a/content/browser/power_profiler/power_profiler_service_unittest.cc
+++ b/content/browser/power_profiler/power_profiler_service_unittest.cc
@@ -13,6 +13,7 @@ namespace content {
namespace {
const int kNumEvents = 3;
+const int kDefaultSamplePeriodMs = 50;
// Provide a set number of power events.
class TestPowerDataProvider : public PowerDataProvider {
@@ -35,6 +36,10 @@ class TestPowerDataProvider : public PowerDataProvider {
return events;
}
+ virtual base::TimeDelta GetSamplingRate() OVERRIDE {
+ return base::TimeDelta::FromMilliseconds(kDefaultSamplePeriodMs);
+ }
+
private:
int num_events_to_send_;
DISALLOW_COPY_AND_ASSIGN(TestPowerDataProvider);
« no previous file with comments | « content/browser/power_profiler/power_profiler_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698