| 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/child/task_queue_impl.h" | 5 #include "components/scheduler/child/task_queue_impl.h" |
| 6 | 6 |
| 7 #include "components/scheduler/child/task_queue_manager.h" | 7 #include "components/scheduler/child/task_queue_manager.h" |
| 8 | 8 |
| 9 namespace scheduler { | 9 namespace scheduler { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #ifndef NDEBUG | 49 #ifndef NDEBUG |
| 50 enqueue_order_set_(false), | 50 enqueue_order_set_(false), |
| 51 #endif | 51 #endif |
| 52 enqueue_order_(0) { | 52 enqueue_order_(0) { |
| 53 sequence_num = sequence_number; | 53 sequence_num = sequence_number; |
| 54 } | 54 } |
| 55 | 55 |
| 56 void TaskQueueImpl::UnregisterTaskQueue() { | 56 void TaskQueueImpl::UnregisterTaskQueue() { |
| 57 if (!task_queue_manager_) | 57 if (!task_queue_manager_) |
| 58 return; | 58 return; |
| 59 task_queue_manager_->UnregisterTaskQueue(make_scoped_refptr(this)); | 59 task_queue_manager_->UnregisterTaskQueue(this); |
| 60 | 60 |
| 61 { | 61 { |
| 62 base::AutoLock lock(lock_); | 62 base::AutoLock lock(lock_); |
| 63 task_queue_manager_ = nullptr; | 63 task_queue_manager_ = nullptr; |
| 64 delayed_task_queue_ = std::priority_queue<Task>(); | 64 delayed_task_queue_ = std::priority_queue<Task>(); |
| 65 incoming_queue_ = std::queue<Task>(); | 65 incoming_queue_ = std::queue<Task>(); |
| 66 work_queue_ = std::queue<Task>(); | 66 work_queue_ = std::queue<Task>(); |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 | 69 |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 state->SetBoolean("nestable", task.nestable); | 495 state->SetBoolean("nestable", task.nestable); |
| 496 state->SetBoolean("is_high_res", task.is_high_res); | 496 state->SetBoolean("is_high_res", task.is_high_res); |
| 497 state->SetDouble( | 497 state->SetDouble( |
| 498 "delayed_run_time", | 498 "delayed_run_time", |
| 499 (task.delayed_run_time - base::TimeTicks()).InMicroseconds() / 1000.0L); | 499 (task.delayed_run_time - base::TimeTicks()).InMicroseconds() / 1000.0L); |
| 500 state->EndDictionary(); | 500 state->EndDictionary(); |
| 501 } | 501 } |
| 502 | 502 |
| 503 } // namespace internal | 503 } // namespace internal |
| 504 } // namespace scheduler | 504 } // namespace scheduler |
| OLD | NEW |