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

Side by Side Diff: base/cancelable_callback.h

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 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_list_unittest.nc ('k') | base/command_line.cc » ('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) 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 // CancelableCallback is a wrapper around base::Callback that allows 5 // CancelableCallback is a wrapper around base::Callback that allows
6 // cancellation of a callback. CancelableCallback takes a reference on the 6 // cancellation of a callback. CancelableCallback takes a reference on the
7 // wrapped callback until this object is destroyed or Reset()/Cancel() are 7 // wrapped callback until this object is destroyed or Reset()/Cancel() are
8 // called. 8 // called.
9 // 9 //
10 // NOTE: 10 // NOTE:
(...skipping 30 matching lines...) Expand all
41 41
42 #ifndef BASE_CANCELABLE_CALLBACK_H_ 42 #ifndef BASE_CANCELABLE_CALLBACK_H_
43 #define BASE_CANCELABLE_CALLBACK_H_ 43 #define BASE_CANCELABLE_CALLBACK_H_
44 44
45 #include "base/base_export.h" 45 #include "base/base_export.h"
46 #include "base/bind.h" 46 #include "base/bind.h"
47 #include "base/callback.h" 47 #include "base/callback.h"
48 #include "base/callback_internal.h" 48 #include "base/callback_internal.h"
49 #include "base/compiler_specific.h" 49 #include "base/compiler_specific.h"
50 #include "base/logging.h" 50 #include "base/logging.h"
51 #include "base/macros.h"
51 #include "base/memory/weak_ptr.h" 52 #include "base/memory/weak_ptr.h"
52 53
53 namespace base { 54 namespace base {
54 55
55 template <typename Sig> 56 template <typename Sig>
56 class CancelableCallback; 57 class CancelableCallback;
57 58
58 template <typename... A> 59 template <typename... A>
59 class CancelableCallback<void(A...)> { 60 class CancelableCallback<void(A...)> {
60 public: 61 public:
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 base::WeakPtrFactory<CancelableCallback<void(A...)>> weak_factory_; 123 base::WeakPtrFactory<CancelableCallback<void(A...)>> weak_factory_;
123 124
124 DISALLOW_COPY_AND_ASSIGN(CancelableCallback); 125 DISALLOW_COPY_AND_ASSIGN(CancelableCallback);
125 }; 126 };
126 127
127 typedef CancelableCallback<void(void)> CancelableClosure; 128 typedef CancelableCallback<void(void)> CancelableClosure;
128 129
129 } // namespace base 130 } // namespace base
130 131
131 #endif // BASE_CANCELABLE_CALLBACK_H_ 132 #endif // BASE_CANCELABLE_CALLBACK_H_
OLDNEW
« no previous file with comments | « base/callback_list_unittest.nc ('k') | base/command_line.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698