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

Unified Diff: components/scheduler/renderer/task_cost_estimator.h

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test Created 5 years, 2 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: components/scheduler/renderer/task_cost_estimator.h
diff --git a/components/scheduler/renderer/task_cost_estimator.h b/components/scheduler/renderer/task_cost_estimator.h
index 7fe68db67e4e734edee79520e21605df3ce565ad..fa0f4c4897eee39e24c9670a662fa39880fc7b09 100644
--- a/components/scheduler/renderer/task_cost_estimator.h
+++ b/components/scheduler/renderer/task_cost_estimator.h
@@ -20,7 +20,9 @@ namespace scheduler {
class SCHEDULER_EXPORT TaskCostEstimator
: public base::MessageLoop::TaskObserver {
public:
- TaskCostEstimator(int sample_count, double estimation_percentile);
+ TaskCostEstimator(base::TickClock* time_source,
+ int sample_count,
+ double estimation_percentile);
~TaskCostEstimator() override;
base::TimeDelta expected_task_duration() const;
@@ -31,11 +33,9 @@ class SCHEDULER_EXPORT TaskCostEstimator
void Clear();
- void SetTimeSourceForTesting(scoped_ptr<base::TickClock> time_source);
-
private:
cc::RollingTimeDeltaHistory rolling_time_delta_history_;
- scoped_ptr<base::TickClock> time_source_;
+ base::TickClock* time_source_; // NOT OWNED
int outstanding_task_count_;
double estimation_percentile_;
base::TimeTicks task_start_time_;

Powered by Google App Engine
This is Rietveld 408576698