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

Unified Diff: components/scheduler/child/task_queue_manager.h

Issue 1259583006: Reland: Explicitly track the scheduler task enqueueing order in a new field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 5 years, 4 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/child/task_queue_manager.h
diff --git a/components/scheduler/child/task_queue_manager.h b/components/scheduler/child/task_queue_manager.h
index 8a78dc5ad30b70690179159b53413e2f3cb69b47..5fb88648e4dcc42c7ce40166404079683401f1fc 100644
--- a/components/scheduler/child/task_queue_manager.h
+++ b/components/scheduler/child/task_queue_manager.h
@@ -31,6 +31,7 @@ class TracedValue;
namespace scheduler {
namespace internal {
class LazyNow;
+struct SchedulerTask;
class TaskQueueImpl;
} // namespace internal
@@ -103,7 +104,7 @@ class SCHEDULER_EXPORT TaskQueueManager
void OnTaskQueueEnabled() override;
// Called by the task queue to register a new pending task.
- void DidQueueTask(const base::PendingTask& pending_task);
+ void DidQueueTask(internal::SchedulerTask& pending_task);
Sami 2015/08/05 11:27:34 The argument should be a pointer since we're modif
alex clarke (OOO till 29th) 2015/08/05 14:32:44 Done.
// Post a task to call DoWork() on the main task runner. Only one pending
// DoWork is allowed from the main thread, to prevent an explosion of pending
@@ -119,7 +120,7 @@ class SCHEDULER_EXPORT TaskQueueManager
// run and |should_trigger_wakeup|. Call with an empty |previous_task| if no
// task was just run.
void UpdateWorkQueues(bool should_trigger_wakeup,
- const base::PendingTask* previous_task);
+ const internal::SchedulerTask* previous_task);
// 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
@@ -131,7 +132,7 @@ class SCHEDULER_EXPORT TaskQueueManager
// run loop. The queue must not be empty. Returns true if the TaskQueueManager
// got deleted, and false otherwise.
bool ProcessTaskFromWorkQueue(internal::TaskQueueImpl* queue,
- base::PendingTask* out_previous_task);
+ internal::SchedulerTask* out_previous_task);
bool RunsTasksOnCurrentThread() const;
bool PostDelayedTask(const tracked_objects::Location& from_here,
@@ -144,6 +145,7 @@ class SCHEDULER_EXPORT TaskQueueManager
base::TimeTicks Now() const;
int GetNextSequenceNumber();
+ int GetNextAgeNumber();
scoped_refptr<base::trace_event::ConvertableToTraceFormat>
AsValueWithSelectorResult(bool should_run,
@@ -169,6 +171,7 @@ class SCHEDULER_EXPORT TaskQueueManager
std::set<internal::TaskQueueImpl*> updatable_queue_set_;
base::AtomicSequenceNumber task_sequence_num_;
+ base::AtomicSequenceNumber task_age_num_;
base::debug::TaskAnnotator task_annotator_;
base::ThreadChecker main_thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698