| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 TOOLS_ANDROID_FORWARDER2_SELF_DELETER_HELPER_H_ | 5 #ifndef TOOLS_ANDROID_FORWARDER2_SELF_DELETER_HELPER_H_ |
| 6 #define TOOLS_ANDROID_FORWARDER2_SELF_DELETER_HELPER_H_ | 6 #define TOOLS_ANDROID_FORWARDER2_SELF_DELETER_HELPER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 | 21 |
| 22 class SingleThreadTaskRunner; | 22 class SingleThreadTaskRunner; |
| 23 | 23 |
| 24 } // namespace base | 24 } // namespace base |
| 25 | 25 |
| 26 namespace forwarder2 { | 26 namespace forwarder2 { |
| 27 | 27 |
| 28 // Helper template class to be used in the following case: | 28 // Helper template class to be used in the following case: |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // that any WeakPtrs to Controller are invalidated before its members | 133 // that any WeakPtrs to Controller are invalidated before its members |
| 134 // variable's destructors are executed, rendering them invalid. | 134 // variable's destructors are executed, rendering them invalid. |
| 135 base::WeakPtrFactory<SelfDeleterHelper<T> > weak_ptr_factory_; | 135 base::WeakPtrFactory<SelfDeleterHelper<T> > weak_ptr_factory_; |
| 136 | 136 |
| 137 DISALLOW_COPY_AND_ASSIGN(SelfDeleterHelper); | 137 DISALLOW_COPY_AND_ASSIGN(SelfDeleterHelper); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 } // namespace forwarder2 | 140 } // namespace forwarder2 |
| 141 | 141 |
| 142 #endif // TOOLS_ANDROID_FORWARDER2_SELF_DELETER_HELPER_H_ | 142 #endif // TOOLS_ANDROID_FORWARDER2_SELF_DELETER_HELPER_H_ |
| OLD | NEW |