| Index: base/threading/thread_checker_unittest.cc
|
| diff --git a/base/threading/thread_checker_unittest.cc b/base/threading/thread_checker_unittest.cc
|
| index 96455e66c704efee659099ff6db2fd484b4b550e..baec975ca43a98d60626a3ac2d0fda01c6e830ee 100644
|
| --- a/base/threading/thread_checker_unittest.cc
|
| +++ b/base/threading/thread_checker_unittest.cc
|
| @@ -6,11 +6,13 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/bind_helpers.h"
|
| +#include "base/logging.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/sequence_token.h"
|
| #include "base/test/test_simple_task_runner.h"
|
| #include "base/threading/simple_thread.h"
|
| +#include "base/threading/thread_checker.h"
|
| #include "base/threading/thread_checker_impl.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -18,6 +20,18 @@
|
| namespace base {
|
| namespace {
|
|
|
| +#if !DCHECK_IS_ON()
|
| +class ClassWithThreadChecker {
|
| + BASE_EXPORT size_t SilenceUnusedWarnings() {
|
| + return x + (y.CalledOnValidThread() ? 1 : 0);
|
| + }
|
| + uint32_t x;
|
| + ThreadChecker y;
|
| +};
|
| +
|
| +static_assert(sizeof(ClassWithThreadChecker) == sizeof(uint32_t), "ThreadCheckerShouldHaveZeroSize");
|
| +#endif
|
| +
|
| // A thread that runs a callback.
|
| class RunCallbackThread : public SimpleThread {
|
| public:
|
|
|