| 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" | 9 #include "base/basictypes.h" |
| 10 | 10 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 void swap(T** pp) { | 215 void swap(T** pp) { |
| 216 T* p = ptr_; | 216 T* p = ptr_; |
| 217 ptr_ = *pp; | 217 ptr_ = *pp; |
| 218 *pp = p; | 218 *pp = p; |
| 219 } | 219 } |
| 220 | 220 |
| 221 void swap(scoped_refptr<T>& r) { | 221 void swap(scoped_refptr<T>& r) { |
| 222 swap(&r.ptr_); | 222 swap(&r.ptr_); |
| 223 } | 223 } |
| 224 | 224 |
| 225 private: | 225 protected: |
| 226 T* ptr_; | 226 T* ptr_; |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 #endif // BASE_REF_COUNTED_H_ | 229 #endif // BASE_REF_COUNTED_H_ |
| OLD | NEW |