OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/scheduler/base/time_domain.h" | 5 #include "components/scheduler/base/time_domain.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "components/scheduler/base/task_queue_impl.h" | 9 #include "components/scheduler/base/task_queue_impl.h" |
10 #include "components/scheduler/base/task_queue_manager_delegate.h" | 10 #include "components/scheduler/base/task_queue_manager_delegate.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 *out_task_queue = delayed_wakeup_multimap_.begin()->second; | 221 *out_task_queue = delayed_wakeup_multimap_.begin()->second; |
222 return true; | 222 return true; |
223 } | 223 } |
224 | 224 |
225 void TimeDomain::AsValueInto(base::trace_event::TracedValue* state) const { | 225 void TimeDomain::AsValueInto(base::trace_event::TracedValue* state) const { |
226 state->BeginDictionary(); | 226 state->BeginDictionary(); |
227 state->SetString("name", GetName()); | 227 state->SetString("name", GetName()); |
228 state->BeginArray("updatable_queue_set"); | 228 state->BeginArray("updatable_queue_set"); |
229 for (auto& queue : updatable_queue_set_) | 229 for (auto& queue : updatable_queue_set_) |
230 state->AppendString(queue->GetName()); | 230 state->AppendString(queue->GetName()); |
231 state->EndArray(); | |
benjhayden
2016/03/21 17:32:56
Looks like a bugfix for a separate CL?
Sami
2016/03/21 19:16:29
Done (landed separately).
| |
231 state->SetInteger("registered_delay_count", delayed_wakeup_multimap_.size()); | 232 state->SetInteger("registered_delay_count", delayed_wakeup_multimap_.size()); |
232 if (!delayed_wakeup_multimap_.empty()) { | 233 if (!delayed_wakeup_multimap_.empty()) { |
233 base::TimeDelta delay = delayed_wakeup_multimap_.begin()->first - Now(); | 234 base::TimeDelta delay = delayed_wakeup_multimap_.begin()->first - Now(); |
234 state->SetDouble("next_delay_ms", delay.InMillisecondsF()); | 235 state->SetDouble("next_delay_ms", delay.InMillisecondsF()); |
235 } | 236 } |
236 state->EndArray(); | |
237 AsValueIntoInternal(state); | 237 AsValueIntoInternal(state); |
238 state->EndDictionary(); | 238 state->EndDictionary(); |
239 } | 239 } |
240 | 240 |
241 } // namespace scheduler | 241 } // namespace scheduler |
OLD | NEW |