| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "base/threading/thread_collision_warner.h" | 6 #include "base/threading/thread_collision_warner.h" |
| 7 | 7 |
| 8 namespace base { | 8 namespace base { |
| 9 | 9 |
| 10 namespace subtle { | 10 namespace subtle { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 in_dtor_ = true; | 44 in_dtor_ = true; |
| 45 #endif | 45 #endif |
| 46 return true; | 46 return true; |
| 47 } | 47 } |
| 48 return false; | 48 return false; |
| 49 } | 49 } |
| 50 | 50 |
| 51 } // namespace subtle | 51 } // namespace subtle |
| 52 | 52 |
| 53 } // namespace base | 53 } // namespace base |
| 54 |
| 55 scoped_refptr<ThreadUnsafe> get_thread_unsafe() { |
| 56 static scoped_refptr<ThreadUnsafe>* g_thread_unsafe = |
| 57 new scoped_refptr<ThreadUnsafe>(new ThreadUnsafe()); |
| 58 return *g_thread_unsafe; |
| 59 } |
| 60 |
| 61 scoped_refptr<ThreadSafe> get_thread_safe() { |
| 62 static scoped_refptr<ThreadSafe>* g_thread_safe = |
| 63 new scoped_refptr<ThreadSafe>(new ThreadSafe()); |
| 64 return *g_thread_safe; |
| 65 } |
| OLD | NEW |