| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/task_scheduler/priority_queue.h" | 5 #include "base/task_scheduler/priority_queue.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| 11 namespace base { | 11 namespace base { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 PriorityQueue::SequenceAndSortKey::SequenceAndSortKey() | 14 PriorityQueue::SequenceAndSortKey::SequenceAndSortKey() = default; |
| 15 : sort_key(TaskPriority::LOWEST, TimeTicks()) {} | |
| 16 | 15 |
| 17 PriorityQueue::SequenceAndSortKey::SequenceAndSortKey( | 16 PriorityQueue::SequenceAndSortKey::SequenceAndSortKey( |
| 18 scoped_refptr<Sequence> sequence, | 17 scoped_refptr<Sequence> sequence, |
| 19 const SequenceSortKey& sort_key) | 18 const SequenceSortKey& sort_key) |
| 20 : sequence(std::move(sequence)), sort_key(sort_key) {} | 19 : sequence(std::move(sequence)), sort_key(sort_key) {} |
| 21 | 20 |
| 22 PriorityQueue::SequenceAndSortKey::~SequenceAndSortKey() = default; | 21 PriorityQueue::SequenceAndSortKey::~SequenceAndSortKey() = default; |
| 23 | 22 |
| 24 PriorityQueue::Transaction::Transaction(PriorityQueue* outer_queue) | 23 PriorityQueue::Transaction::Transaction(PriorityQueue* outer_queue) |
| 25 : auto_lock_(new AutoSchedulerLock(outer_queue->container_lock_)), | 24 : auto_lock_(new AutoSchedulerLock(outer_queue->container_lock_)), |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 79 } |
| 81 | 80 |
| 82 PriorityQueue::~PriorityQueue() = default; | 81 PriorityQueue::~PriorityQueue() = default; |
| 83 | 82 |
| 84 scoped_ptr<PriorityQueue::Transaction> PriorityQueue::BeginTransaction() { | 83 scoped_ptr<PriorityQueue::Transaction> PriorityQueue::BeginTransaction() { |
| 85 return make_scoped_ptr(new Transaction(this)); | 84 return make_scoped_ptr(new Transaction(this)); |
| 86 } | 85 } |
| 87 | 86 |
| 88 } // namespace internal | 87 } // namespace internal |
| 89 } // namespace base | 88 } // namespace base |
| OLD | NEW |