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/scheduler_lock.h" | 5 #include "base/task_scheduler/scheduler_lock.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <unordered_map> | 8 #include <unordered_map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 SafeAcquisitionTracker::GetInstance()->RecordAcquisition(this)); | 125 SafeAcquisitionTracker::GetInstance()->RecordAcquisition(this)); |
126 } | 126 } |
127 | 127 |
128 void SchedulerLock::Release() { | 128 void SchedulerLock::Release() { |
129 lock_.Release(); | 129 lock_.Release(); |
130 DCHECK_ON_ONLY(SafeAcquisitionTracker::GetInstance()->RecordRelease(this)); | 130 DCHECK_ON_ONLY(SafeAcquisitionTracker::GetInstance()->RecordRelease(this)); |
131 } | 131 } |
132 | 132 |
133 scoped_ptr<ConditionVariable> SchedulerLock::CreateConditionVariable() { | 133 scoped_ptr<ConditionVariable> SchedulerLock::CreateConditionVariable() { |
134 scoped_ptr<ConditionVariable> cond_var(new ConditionVariable(&lock_)); | 134 scoped_ptr<ConditionVariable> cond_var(new ConditionVariable(&lock_)); |
135 return std::move(cond_var); | 135 return cond_var; |
136 } | 136 } |
137 | 137 |
138 } // namespace internal | 138 } // namespace internal |
139 } // base | 139 } // base |
OLD | NEW |