| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef BASE_REF_COUNTED_H_ | 5 #ifndef BASE_REF_COUNTED_H_ |
| 6 #define BASE_REF_COUNTED_H_ | 6 #define BASE_REF_COUNTED_H_ |
| 7 | 7 |
| 8 #include "base/atomic_ref_count.h" | 8 #include "base/atomic_ref_count.h" |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/thread_collision_warner.h" | 9 #include "base/thread_collision_warner.h" |
| 11 | 10 |
| 12 namespace base { | 11 namespace base { |
| 13 | 12 |
| 14 namespace subtle { | 13 namespace subtle { |
| 15 | 14 |
| 16 class RefCountedBase { | 15 class RefCountedBase { |
| 17 protected: | 16 protected: |
| 18 RefCountedBase(); | 17 RefCountedBase(); |
| 19 ~RefCountedBase(); | 18 ~RefCountedBase(); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 222 |
| 224 void swap(scoped_refptr<T>& r) { | 223 void swap(scoped_refptr<T>& r) { |
| 225 swap(&r.ptr_); | 224 swap(&r.ptr_); |
| 226 } | 225 } |
| 227 | 226 |
| 228 protected: | 227 protected: |
| 229 T* ptr_; | 228 T* ptr_; |
| 230 }; | 229 }; |
| 231 | 230 |
| 232 #endif // BASE_REF_COUNTED_H_ | 231 #endif // BASE_REF_COUNTED_H_ |
| OLD | NEW |