OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BASE_TASK_SCHEDULER_UTILS_H_ | |
6 #define BASE_TASK_SCHEDULER_UTILS_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "base/base_export.h" | |
11 #include "base/memory/ref_counted.h" | |
12 #include "base/task_scheduler/sequence.h" | |
13 #include "base/task_scheduler/task.h" | |
14 | |
15 namespace base { | |
16 namespace internal { | |
17 | |
18 class PriorityQueue; | |
19 class TaskTracker; | |
20 | |
21 // Helper for posting |task| to the provided |sequence| and |priority_queue| | |
22 // conditional on |task_tracker|. Returns true if |task| is posted. | |
23 bool BASE_EXPORT PostTaskHelper(std::unique_ptr<Task> task, | |
gab
2016/04/08 17:56:00
This method could be private on SchedulerThreadPoo
danakj
2016/04/08 18:05:32
That, or protected with a TestSTP that makes it pu
fdoray
2016/04/08 19:00:05
I don't think that this helper should be in STP. I
| |
24 scoped_refptr<Sequence> sequence, | |
25 PriorityQueue* priority_queue, | |
26 TaskTracker* task_tracker); | |
27 | |
28 } // namespace internal | |
29 } // namespace base | |
30 | |
31 #endif // BASE_TASK_SCHEDULER_UTILS_H_ | |
OLD | NEW |