Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: base/callback_internal.h

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/callback.h ('k') | base/callback_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This file contains utility functions and classes that help the 5 // This file contains utility functions and classes that help the
6 // implementation, and management of the Callback objects. 6 // implementation, and management of the Callback objects.
7 7
8 #ifndef BASE_CALLBACK_INTERNAL_H_ 8 #ifndef BASE_CALLBACK_INTERNAL_H_
9 #define BASE_CALLBACK_INTERNAL_H_ 9 #define BASE_CALLBACK_INTERNAL_H_
10 10
11 #include <stddef.h> 11 #include <stddef.h>
12 #include <memory> 12 #include <memory>
13 #include <type_traits> 13 #include <type_traits>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/atomic_ref_count.h" 16 #include "base/atomic_ref_count.h"
17 #include "base/base_export.h" 17 #include "base/base_export.h"
18 #include "base/callback_forward.h" 18 #include "base/callback_forward.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
21 #include "base/memory/scoped_ptr.h"
22 21
23 namespace base { 22 namespace base {
24 namespace internal { 23 namespace internal {
25 template <CopyMode copy_mode> 24 template <CopyMode copy_mode>
26 class CallbackBase; 25 class CallbackBase;
27 26
28 // BindStateBase is used to provide an opaque handle that the Callback 27 // BindStateBase is used to provide an opaque handle that the Callback
29 // class can use to represent a function object with bound arguments. It 28 // class can use to represent a function object with bound arguments. It
30 // behaves as an existential type that is used by a corresponding 29 // behaves as an existential type that is used by a corresponding
31 // DoInvoke function to perform the function execution. This allows 30 // DoInvoke function to perform the function execution. This allows
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 template <typename T> 236 template <typename T>
238 typename std::enable_if<IsMoveOnlyType<T>::value, T>::type CallbackForward( 237 typename std::enable_if<IsMoveOnlyType<T>::value, T>::type CallbackForward(
239 T& t) { 238 T& t) {
240 return std::move(t); 239 return std::move(t);
241 } 240 }
242 241
243 } // namespace internal 242 } // namespace internal
244 } // namespace base 243 } // namespace base
245 244
246 #endif // BASE_CALLBACK_INTERNAL_H_ 245 #endif // BASE_CALLBACK_INTERNAL_H_
OLDNEW
« no previous file with comments | « base/callback.h ('k') | base/callback_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698