OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/child/scheduler/prioritizing_task_queue_selector.h" | 5 #include "components/scheduler/child/prioritizing_task_queue_selector.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/pending_task.h" | 8 #include "base/pending_task.h" |
9 #include "base/trace_event/trace_event_argument.h" | 9 #include "base/trace_event/trace_event_argument.h" |
10 | 10 |
11 namespace content { | 11 namespace scheduler { |
12 | 12 |
13 PrioritizingTaskQueueSelector::PrioritizingTaskQueueSelector() | 13 PrioritizingTaskQueueSelector::PrioritizingTaskQueueSelector() |
14 : starvation_count_(0), task_queue_selector_observer_(nullptr) { | 14 : starvation_count_(0), task_queue_selector_observer_(nullptr) { |
15 } | 15 } |
16 | 16 |
17 PrioritizingTaskQueueSelector::~PrioritizingTaskQueueSelector() { | 17 PrioritizingTaskQueueSelector::~PrioritizingTaskQueueSelector() { |
18 } | 18 } |
19 | 19 |
20 void PrioritizingTaskQueueSelector::RegisterWorkQueues( | 20 void PrioritizingTaskQueueSelector::RegisterWorkQueues( |
21 const std::vector<const base::TaskQueue*>& work_queues) { | 21 const std::vector<const base::TaskQueue*>& work_queues) { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 state->EndDictionary(); | 183 state->EndDictionary(); |
184 state->SetInteger("starvation_count", starvation_count_); | 184 state->SetInteger("starvation_count", starvation_count_); |
185 } | 185 } |
186 | 186 |
187 void PrioritizingTaskQueueSelector::SetTaskQueueSelectorObserver( | 187 void PrioritizingTaskQueueSelector::SetTaskQueueSelectorObserver( |
188 Observer* observer) { | 188 Observer* observer) { |
189 task_queue_selector_observer_ = observer; | 189 task_queue_selector_observer_ = observer; |
190 } | 190 } |
191 | 191 |
192 } // namespace content | 192 } // namespace scheduler |
OLD | NEW |