12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef BASE_SEQUENCE_CHECKER_IMPL_H_
- #define BASE_SEQUENCE_CHECKER_IMPL_H_
- #include <memory>
- #include "base/base_export.h"
- #include "base/synchronization/lock.h"
- #include "base/thread_annotations.h"
- namespace base {
- class LOCKABLE BASE_EXPORT SequenceCheckerImpl {
- public:
- SequenceCheckerImpl();
-
-
-
-
-
-
- SequenceCheckerImpl(SequenceCheckerImpl&& other);
- SequenceCheckerImpl& operator=(SequenceCheckerImpl&& other);
- SequenceCheckerImpl(const SequenceCheckerImpl&) = delete;
- SequenceCheckerImpl& operator=(const SequenceCheckerImpl&) = delete;
- ~SequenceCheckerImpl();
-
-
- bool CalledOnValidSequence() const WARN_UNUSED_RESULT;
-
-
- void DetachFromSequence();
- private:
- class Core;
-
-
- static bool HasThreadLocalStorageBeenDestroyed();
- mutable Lock lock_;
- mutable std::unique_ptr<Core> core_ GUARDED_BY(lock_);
- };
- }
- #endif
|