| OLD | NEW |
| 1 // Copyright (c) 2009 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/ref_counted.h" | 5 #include "base/ref_counted.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/thread_collision_warner.h" | 8 #include "base/threading/thread_collision_warner.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 | 11 |
| 12 namespace subtle { | 12 namespace subtle { |
| 13 | 13 |
| 14 RefCountedBase::RefCountedBase() | 14 RefCountedBase::RefCountedBase() |
| 15 : ref_count_(0) | 15 : ref_count_(0) |
| 16 #ifndef NDEBUG | 16 #ifndef NDEBUG |
| 17 , in_dtor_(false) | 17 , in_dtor_(false) |
| 18 #endif | 18 #endif |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool RefCountedThreadSafeBase::HasOneRef() const { | 88 bool RefCountedThreadSafeBase::HasOneRef() const { |
| 89 return AtomicRefCountIsOne( | 89 return AtomicRefCountIsOne( |
| 90 &const_cast<RefCountedThreadSafeBase*>(this)->ref_count_); | 90 &const_cast<RefCountedThreadSafeBase*>(this)->ref_count_); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace subtle | 93 } // namespace subtle |
| 94 | 94 |
| 95 } // namespace base | 95 } // namespace base |
| OLD | NEW |