OLD | NEW |
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 #include "base/task_scheduler/scheduler_service_thread.h" | 5 #include "base/task_scheduler/scheduler_service_thread.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 void OnMainEntry(SchedulerWorker* worker, | 28 void OnMainEntry(SchedulerWorker* worker, |
29 const TimeDelta& detach_duration) override { | 29 const TimeDelta& detach_duration) override { |
30 DCHECK(detach_duration.is_max()); | 30 DCHECK(detach_duration.is_max()); |
31 } | 31 } |
32 | 32 |
33 scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) override { | 33 scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) override { |
34 delayed_task_manager_->PostReadyTasks(); | 34 delayed_task_manager_->PostReadyTasks(); |
35 return nullptr; | 35 return nullptr; |
36 } | 36 } |
37 | 37 |
38 void DidRunTask(const Task* task, const TimeDelta& task_latency) override { | 38 void DidRunTaskWithPriority(TaskPriority task_priority, |
| 39 const TimeDelta& task_latency) override { |
39 NOTREACHED() | 40 NOTREACHED() |
40 << "GetWork() never returns a sequence so no task should ever run."; | 41 << "GetWork() never returns a sequence so no task should ever run."; |
41 } | 42 } |
42 | 43 |
43 void ReEnqueueSequence(scoped_refptr<Sequence> sequence) override { | 44 void ReEnqueueSequence(scoped_refptr<Sequence> sequence) override { |
44 NOTREACHED() << | 45 NOTREACHED() << |
45 "GetWork() never returns a sequence so there's nothing to reenqueue."; | 46 "GetWork() never returns a sequence so there's nothing to reenqueue."; |
46 } | 47 } |
47 | 48 |
48 TimeDelta GetSleepTimeout() override { | 49 TimeDelta GetSleepTimeout() override { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 93 |
93 void SchedulerServiceThread::JoinForTesting() { | 94 void SchedulerServiceThread::JoinForTesting() { |
94 worker_->JoinForTesting(); | 95 worker_->JoinForTesting(); |
95 } | 96 } |
96 | 97 |
97 SchedulerServiceThread::SchedulerServiceThread( | 98 SchedulerServiceThread::SchedulerServiceThread( |
98 std::unique_ptr<SchedulerWorker> worker) : worker_(std::move(worker)) {} | 99 std::unique_ptr<SchedulerWorker> worker) : worker_(std::move(worker)) {} |
99 | 100 |
100 } // namespace internal | 101 } // namespace internal |
101 } // namespace base | 102 } // namespace base |
OLD | NEW |