1 // Copyright (c) 2011 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_impl.h" 6 7 #include "base/logging.h" 8 9 namespace base { 10 11 NonThreadSafeImpl::~NonThreadSafeImpl() { 12 DCHECK(CalledOnValidThread()); 13 } 14 15 bool NonThreadSafeImpl::CalledOnValidThread() const { 16 return thread_checker_.CalledOnValidThread(); 17 } 18 19 void NonThreadSafeImpl::DetachFromThread() { 20 thread_checker_.DetachFromThread(); 21 } 22 23 } // namespace base 24