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

Side by Side Diff: base/task_scheduler/utils.h

Issue 1806473002: TaskScheduler [9] Delayed Task Manager (Closed) Base URL: https://luckyluke-private.googlesource.com/src@s_5_worker_thread
Patch Set: self review Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_TASK_SCHEDULER_UTILS_H_ 5 #ifndef BASE_TASK_SCHEDULER_UTILS_H_
6 #define BASE_TASK_SCHEDULER_UTILS_H_ 6 #define BASE_TASK_SCHEDULER_UTILS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/task_scheduler/sequence.h" 12 #include "base/task_scheduler/sequence.h"
13 #include "base/task_scheduler/task.h" 13 #include "base/task_scheduler/task.h"
14 14
15 namespace base { 15 namespace base {
16 namespace internal { 16 namespace internal {
17 17
18 class DelayedTaskManager;
18 class PriorityQueue; 19 class PriorityQueue;
19 class TaskTracker; 20 class TaskTracker;
20 21
22 // Helper for posting |task| to the provided |sequence| and |priority_queue|.
23 void BASE_EXPORT PostTaskNowHelper(std::unique_ptr<Task> task,
gab 2016/04/11 18:28:30 Move to anonymous namespace and have tests go thro
fdoray 2016/04/11 19:57:06 Can't move to anonymous namespace because it's use
24 scoped_refptr<Sequence> sequence,
25 PriorityQueue* priority_queue);
26
21 // Helper for posting |task| to the provided |sequence| and |priority_queue| 27 // Helper for posting |task| to the provided |sequence| and |priority_queue|
22 // conditional on |task_tracker|. Returns true if |task| is posted. 28 // conditional on |task_tracker|. |task| goes through |delayed_task_manager| if
29 // it is delayed. Returns true if |task| is posted.
23 bool BASE_EXPORT PostTaskHelper(std::unique_ptr<Task> task, 30 bool BASE_EXPORT PostTaskHelper(std::unique_ptr<Task> task,
24 scoped_refptr<Sequence> sequence, 31 scoped_refptr<Sequence> sequence,
25 PriorityQueue* priority_queue, 32 PriorityQueue* priority_queue,
26 TaskTracker* task_tracker); 33 TaskTracker* task_tracker,
34 DelayedTaskManager* delayed_task_manager);
27 35
28 } // namespace internal 36 } // namespace internal
29 } // namespace base 37 } // namespace base
30 38
31 #endif // BASE_TASK_SCHEDULER_UTILS_H_ 39 #endif // BASE_TASK_SCHEDULER_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698