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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h

Issue 2644553002: Refactor TimeDomain::MaybeAdvanceTime in preparation for DoWork deduping (Closed)
Patch Set: Add tests for ComputeDelayTillNextTask Created 3 years, 11 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: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
index 53b95608089341615c3bcaf7ed958a35eb90907d..af966d099b75e6278aef2dbeaae7f8f26a773e8a 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
@@ -176,7 +176,7 @@ class BLINK_PLATFORM_EXPORT TaskQueueManager
// Delayed Tasks with run_times <= Now() are enqueued onto the work queue and
// reloads any empty work queues.
- void UpdateWorkQueues(LazyNow lazy_now);
+ void UpdateWorkQueues(LazyNow* lazy_now);
// Chooses the next work queue to service. Returns true if |out_queue|
// indicates the queue from which the next task should be run, false to
@@ -201,9 +201,9 @@ class BLINK_PLATFORM_EXPORT TaskQueueManager
internal::EnqueueOrder GetNextSequenceNumber();
- // Calls MaybeAdvanceTime on all time domains and returns true if one of them
- // was able to advance.
- bool TryAdvanceTimeDomains();
+ // Calls DelayTillNextTask on all time domains and returns the smallest delay
+ // requested if any.
+ base::Optional<base::TimeDelta> ComputeDelayTillNextTask(LazyNow* lazy_now);
void MaybeRecordTaskDelayHistograms(
const internal::TaskQueueImpl::Task& pending_task,

Powered by Google App Engine
This is Rietveld 408576698