Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: base/threading/non_thread_safe.cc

Issue 6599004: Modify ThreadChecker and NonThreadSafe so that their functionality is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to current lkgr Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 #include "base/threading/non_thread_safe.h" 5 #include "base/threading/non_thread_safe.h"
6 6
7 // These checks are only done in debug builds.
8 #ifndef NDEBUG
9
10 #include "base/logging.h" 7 #include "base/logging.h"
11 8
12 namespace base { 9 namespace base {
13 10
14 NonThreadSafe::~NonThreadSafe() { 11 NonThreadSafeImpl::~NonThreadSafeImpl() {
15 DCHECK(CalledOnValidThread()); 12 DCHECK(CalledOnValidThread());
16 } 13 }
17 14
18 bool NonThreadSafe::CalledOnValidThread() const { 15 bool NonThreadSafeImpl::CalledOnValidThread() const {
19 return thread_checker_.CalledOnValidThread(); 16 return thread_checker_.CalledOnValidThread();
20 } 17 }
21 18
22 void NonThreadSafe::DetachFromThread() { 19 void NonThreadSafeImpl::DetachFromThread() {
23 thread_checker_.DetachFromThread(); 20 thread_checker_.DetachFromThread();
24 } 21 }
25 22
26 } // namespace base 23 } // namespace base
27
28 #endif // NDEBUG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698