| 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/renderer/scheduler/renderer_task_queue_selector.h" | 5 #include "content/renderer/scheduler/renderer_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 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return "normal"; | 146 return "normal"; |
| 147 case BEST_EFFORT_PRIORITY: | 147 case BEST_EFFORT_PRIORITY: |
| 148 return "best_effort"; | 148 return "best_effort"; |
| 149 default: | 149 default: |
| 150 NOTREACHED(); | 150 NOTREACHED(); |
| 151 return nullptr; | 151 return nullptr; |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 void RendererTaskQueueSelector::AsValueInto( | 155 void RendererTaskQueueSelector::AsValueInto( |
| 156 base::debug::TracedValue* state) const { | 156 base::trace_event::TracedValue* state) const { |
| 157 DCHECK(main_thread_checker_.CalledOnValidThread()); | 157 DCHECK(main_thread_checker_.CalledOnValidThread()); |
| 158 state->BeginDictionary("priorities"); | 158 state->BeginDictionary("priorities"); |
| 159 for (QueuePriority priority = FIRST_QUEUE_PRIORITY; | 159 for (QueuePriority priority = FIRST_QUEUE_PRIORITY; |
| 160 priority < QUEUE_PRIORITY_COUNT; priority = NextPriority(priority)) { | 160 priority < QUEUE_PRIORITY_COUNT; priority = NextPriority(priority)) { |
| 161 state->BeginArray(PriorityToString(priority)); | 161 state->BeginArray(PriorityToString(priority)); |
| 162 for (size_t queue_index : queue_priorities_[priority]) | 162 for (size_t queue_index : queue_priorities_[priority]) |
| 163 state->AppendInteger(queue_index); | 163 state->AppendInteger(queue_index); |
| 164 state->EndArray(); | 164 state->EndArray(); |
| 165 } | 165 } |
| 166 state->EndDictionary(); | 166 state->EndDictionary(); |
| 167 state->SetInteger("starvation_count", starvation_count_); | 167 state->SetInteger("starvation_count", starvation_count_); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace content | 170 } // namespace content |
| OLD | NEW |