Index: base/task_scheduler/task_tracker.cc |
diff --git a/base/task_scheduler/task_tracker.cc b/base/task_scheduler/task_tracker.cc |
index 50922bbc8cf9004491bc59c1ac4d6bdbf3e1c5d3..c896a9fad9b4f517f0f78499d4df31052668a14a 100644 |
--- a/base/task_scheduler/task_tracker.cc |
+++ b/base/task_scheduler/task_tracker.cc |
@@ -58,19 +58,16 @@ void TaskTracker::Shutdown() { |
} |
} |
-void TaskTracker::PostTask( |
- const Callback<void(std::unique_ptr<Task>)>& post_task_callback, |
- std::unique_ptr<Task> task) { |
- DCHECK(!post_task_callback.is_null()); |
+bool TaskTracker::WillPostTask(const Task* task) { |
DCHECK(task); |
if (!BeforePostTask(task->traits.shutdown_behavior())) |
- return; |
+ return false; |
debug::TaskAnnotator task_annotator; |
task_annotator.DidQueueTask(kQueueFunctionName, *task); |
gab
2016/04/07 17:05:18
Not sure how big of a refactor that would be but i
fdoray
2016/04/07 18:05:58
It's used at 4 other places. Sometimes it's called
|
- post_task_callback.Run(std::move(task)); |
+ return true; |
} |
void TaskTracker::RunTask(const Task* task) { |
gab
2016/04/07 17:05:17
I think I'd asked that on the initial TaskTracker
fdoray
2016/04/07 18:05:58
The Task is owned by its Sequence when it runs.
I
gab
2016/04/07 18:58:57
Ah right, ok let's keep it this way then.
|