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

Unified Diff: components/scheduler/base/time_domain.h

Issue 1730153005: [cherrypick] Fix computation of runtime for throttled tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: no changes Created 4 years, 10 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 | « components/scheduler/base/task_queue_impl.cc ('k') | components/scheduler/base/time_domain_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/time_domain.h
diff --git a/components/scheduler/base/time_domain.h b/components/scheduler/base/time_domain.h
index dd82a13334202fb36550b7a0512d7b05fadac300..4e4fbad633a1ed688f2caa24b55f2fbaeaa0e708 100644
--- a/components/scheduler/base/time_domain.h
+++ b/components/scheduler/base/time_domain.h
@@ -46,6 +46,13 @@ class SCHEDULER_EXPORT TimeDomain {
// TODO(alexclarke): Make this main thread only.
virtual LazyNow CreateLazyNow() = 0;
+ // Computes a runtime which is >= |time_domain_now| + |delay|. This is used to
+ // allow the TimeDomain to decide if the real or virtual time should be used
+ // when computing the task run time. This can be called from any thread.
+ virtual base::TimeTicks ComputeDelayedRunTime(
+ base::TimeTicks time_domain_now,
+ base::TimeDelta delay) const = 0;
+
// Some TimeDomains support virtual time, this method tells us to advance time
// if possible and return true if time was advanced.
virtual bool MaybeAdvanceTime() = 0;
« no previous file with comments | « components/scheduler/base/task_queue_impl.cc ('k') | components/scheduler/base/time_domain_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698