Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: base/task_scheduler/priority_queue.cc

Issue 1704113002: TaskScheduler [6] SchedulerWorkerThread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s_4_shutdown
Patch Set: CR from gab #18 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698