| 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/task_queue_manager.h" | 5 #include "content/renderer/scheduler/task_queue_manager.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 base::AutoLock lock(lock_); | 380 base::AutoLock lock(lock_); |
| 381 state->BeginDictionary(); | 381 state->BeginDictionary(); |
| 382 if (name_) | 382 if (name_) |
| 383 state->SetString("name", name_); | 383 state->SetString("name", name_); |
| 384 state->SetString("pump_policy", PumpPolicyToString(pump_policy_)); | 384 state->SetString("pump_policy", PumpPolicyToString(pump_policy_)); |
| 385 state->BeginArray("incoming_queue"); | 385 state->BeginArray("incoming_queue"); |
| 386 QueueAsValueInto(incoming_queue_, state); | 386 QueueAsValueInto(incoming_queue_, state); |
| 387 state->EndArray(); | 387 state->EndArray(); |
| 388 state->BeginArray("work_queue"); | 388 state->BeginArray("work_queue"); |
| 389 QueueAsValueInto(work_queue_, state); | 389 QueueAsValueInto(work_queue_, state); |
| 390 state->EndArray(); |
| 390 state->BeginArray("delayed_task_queue"); | 391 state->BeginArray("delayed_task_queue"); |
| 391 QueueAsValueInto(delayed_task_queue_, state); | 392 QueueAsValueInto(delayed_task_queue_, state); |
| 392 state->EndArray(); | 393 state->EndArray(); |
| 393 state->EndDictionary(); | 394 state->EndDictionary(); |
| 394 } | 395 } |
| 395 | 396 |
| 396 // static | 397 // static |
| 397 const char* TaskQueue::PumpPolicyToString( | 398 const char* TaskQueue::PumpPolicyToString( |
| 398 TaskQueueManager::PumpPolicy pump_policy) { | 399 TaskQueueManager::PumpPolicy pump_policy) { |
| 399 switch (pump_policy) { | 400 switch (pump_policy) { |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 state->EndArray(); | 698 state->EndArray(); |
| 698 state->BeginDictionary("selector"); | 699 state->BeginDictionary("selector"); |
| 699 selector_->AsValueInto(state.get()); | 700 selector_->AsValueInto(state.get()); |
| 700 state->EndDictionary(); | 701 state->EndDictionary(); |
| 701 if (should_run) | 702 if (should_run) |
| 702 state->SetInteger("selected_queue", selected_queue); | 703 state->SetInteger("selected_queue", selected_queue); |
| 703 return state; | 704 return state; |
| 704 } | 705 } |
| 705 | 706 |
| 706 } // namespace content | 707 } // namespace content |
| OLD | NEW |