OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/base/sequenced_task_checker_impl.h" | 11 #include "webrtc/base/sequenced_task_checker_impl.h" |
12 | 12 |
13 #include "webrtc/base/platform_thread.h" | 13 #include "webrtc/base/platform_thread.h" |
14 #include "webrtc/base/sequenced_task_checker.h" | 14 #include "webrtc/base/sequenced_task_checker.h" |
| 15 #include "webrtc/base/task_queue.h" |
15 | 16 |
16 namespace rtc { | 17 namespace rtc { |
17 | 18 |
18 SequencedTaskCheckerImpl::SequencedTaskCheckerImpl() | 19 SequencedTaskCheckerImpl::SequencedTaskCheckerImpl() |
19 : attached_(true), valid_queue_(TaskQueue::Current()) {} | 20 : attached_(true), valid_queue_(TaskQueue::Current()) {} |
20 | 21 |
21 SequencedTaskCheckerImpl::~SequencedTaskCheckerImpl() {} | 22 SequencedTaskCheckerImpl::~SequencedTaskCheckerImpl() {} |
22 | 23 |
23 bool SequencedTaskCheckerImpl::CalledSequentially() const { | 24 bool SequencedTaskCheckerImpl::CalledSequentially() const { |
24 TaskQueue* current_queue = TaskQueue::Current(); | 25 TaskQueue* current_queue = TaskQueue::Current(); |
(...skipping 18 matching lines...) Expand all Loading... |
43 | 44 |
44 SequencedTaskCheckerScope::SequencedTaskCheckerScope( | 45 SequencedTaskCheckerScope::SequencedTaskCheckerScope( |
45 const SequencedTaskChecker* checker) { | 46 const SequencedTaskChecker* checker) { |
46 RTC_DCHECK(checker->CalledSequentially()); | 47 RTC_DCHECK(checker->CalledSequentially()); |
47 } | 48 } |
48 | 49 |
49 SequencedTaskCheckerScope::~SequencedTaskCheckerScope() {} | 50 SequencedTaskCheckerScope::~SequencedTaskCheckerScope() {} |
50 | 51 |
51 } // namespace internal | 52 } // namespace internal |
52 } // namespace rtc | 53 } // namespace rtc |
OLD | NEW |