OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef BASE_SEQUENCE_CHECKER_IMPL_H_ | 5 #ifndef BASE_SEQUENCE_CHECKER_IMPL_H_ |
6 #define BASE_SEQUENCE_CHECKER_IMPL_H_ | 6 #define BASE_SEQUENCE_CHECKER_IMPL_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/macros.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
11 #include "base/threading/sequenced_worker_pool.h" | 11 #include "base/threading/sequenced_worker_pool.h" |
12 #include "base/threading/thread_checker_impl.h" | 12 #include "base/threading/thread_checker_impl.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 | 15 |
16 // SequenceCheckerImpl is used to help verify that some methods of a | 16 // SequenceCheckerImpl is used to help verify that some methods of a |
17 // class are called in sequence -- that is, called from the same | 17 // class are called in sequence -- that is, called from the same |
18 // SequencedTaskRunner. It is a generalization of ThreadChecker; in | 18 // SequencedTaskRunner. It is a generalization of ThreadChecker; in |
19 // particular, it behaves exactly like ThreadChecker if constructed | 19 // particular, it behaves exactly like ThreadChecker if constructed |
(...skipping 23 matching lines...) Expand all Loading... |
43 mutable bool sequence_token_assigned_; | 43 mutable bool sequence_token_assigned_; |
44 | 44 |
45 mutable SequencedWorkerPool::SequenceToken sequence_token_; | 45 mutable SequencedWorkerPool::SequenceToken sequence_token_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(SequenceCheckerImpl); | 47 DISALLOW_COPY_AND_ASSIGN(SequenceCheckerImpl); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace base | 50 } // namespace base |
51 | 51 |
52 #endif // BASE_SEQUENCE_CHECKER_IMPL_H_ | 52 #endif // BASE_SEQUENCE_CHECKER_IMPL_H_ |
OLD | NEW |