| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MEMORY_REF_COUNTED_H_ | 5 #ifndef BASE_MEMORY_REF_COUNTED_H_ |
| 6 #define BASE_MEMORY_REF_COUNTED_H_ | 6 #define BASE_MEMORY_REF_COUNTED_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 #include <cassert> | 8 #include <cassert> |
| 10 | 9 |
| 11 #include "base/atomic_ref_count.h" | 10 #include "base/atomic_ref_count.h" |
| 12 #include "base/base_export.h" | 11 #include "base/base_export.h" |
| 13 #include "base/threading/thread_collision_warner.h" | 12 #include "base/threading/thread_collision_warner.h" |
| 14 | 13 |
| 15 namespace base { | 14 namespace base { |
| 16 | 15 |
| 17 namespace subtle { | 16 namespace subtle { |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 }; | 305 }; |
| 307 | 306 |
| 308 // Handy utility for creating a scoped_refptr<T> out of a T* explicitly without | 307 // Handy utility for creating a scoped_refptr<T> out of a T* explicitly without |
| 309 // having to retype all the template arguments | 308 // having to retype all the template arguments |
| 310 template <typename T> | 309 template <typename T> |
| 311 scoped_refptr<T> make_scoped_refptr(T* t) { | 310 scoped_refptr<T> make_scoped_refptr(T* t) { |
| 312 return scoped_refptr<T>(t); | 311 return scoped_refptr<T>(t); |
| 313 } | 312 } |
| 314 | 313 |
| 315 #endif // BASE_MEMORY_REF_COUNTED_H_ | 314 #endif // BASE_MEMORY_REF_COUNTED_H_ |
| OLD | NEW |