1 /*
2  *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 // Borrowed from Chromium's src/base/threading/thread_checker.h.
12 
13 #ifndef RTC_BASE_THREAD_CHECKER_H_
14 #define RTC_BASE_THREAD_CHECKER_H_
15 
16 #include "rtc_base/deprecation.h"
17 #include "rtc_base/synchronization/sequence_checker.h"
18 
19 namespace rtc {
20 // TODO(srte): Replace usages of this with SequenceChecker.
21 class ThreadChecker : public webrtc::SequenceChecker {
22  public:
CalledOnValidThread()23   RTC_DEPRECATED bool CalledOnValidThread() const { return IsCurrent(); }
DetachFromThread()24   RTC_DEPRECATED void DetachFromThread() { Detach(); }
25 };
26 }  // namespace rtc
27 #endif  // RTC_BASE_THREAD_CHECKER_H_
28