| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/threading/non_thread_safe.h" | |
| 6 | |
| 7 // These checks are only done in debug builds. | |
| 8 #ifndef NDEBUG | |
| 9 | |
| 10 #include "base/logging.h" | |
| 11 | |
| 12 namespace base { | |
| 13 | |
| 14 NonThreadSafe::~NonThreadSafe() { | |
| 15 DCHECK(CalledOnValidThread()); | |
| 16 } | |
| 17 | |
| 18 bool NonThreadSafe::CalledOnValidThread() const { | |
| 19 return thread_checker_.CalledOnValidThread(); | |
| 20 } | |
| 21 | |
| 22 void NonThreadSafe::DetachFromThread() { | |
| 23 thread_checker_.DetachFromThread(); | |
| 24 } | |
| 25 | |
| 26 } // namespace base | |
| 27 | |
| 28 #endif // NDEBUG | |
| OLD | NEW |