| Index: base/bind_internal.h
|
| diff --git a/base/bind_internal.h b/base/bind_internal.h
|
| index 5845a4d031de9c3df658820a4b2f4cc3e545fe61..0872240e4562a7b44cdc7c8aa064852d08f14258 100644
|
| --- a/base/bind_internal.h
|
| +++ b/base/bind_internal.h
|
| @@ -411,17 +411,25 @@ struct CancellationChecker<
|
| }
|
| };
|
|
|
| -template <typename Signature, typename... BoundArgs>
|
| -struct CancellationChecker<BindState<Callback<Signature>, BoundArgs...>> {
|
| +template <typename BindStateType>
|
| +struct CallbackCancellationChecker {
|
| static constexpr bool is_cancellable = true;
|
| static bool Run(const BindStateBase* base) {
|
| - using Functor = Callback<Signature>;
|
| - using BindStateType = BindState<Functor, BoundArgs...>;
|
| - const BindStateType* bind_state = static_cast<const BindStateType*>(base);
|
| - return bind_state->functor_.IsCancelled();
|
| + return static_cast<const BindStateType*>(base)->functor_.IsCancelled();
|
| }
|
| };
|
|
|
| +template <typename Signature, typename... BoundArgs>
|
| +struct CancellationChecker<BindState<OnceCallback<Signature>, BoundArgs...>>
|
| + : CallbackCancellationChecker<
|
| + BindState<OnceCallback<Signature>, BoundArgs...>> {};
|
| +
|
| +template <typename Signature, typename... BoundArgs>
|
| +struct CancellationChecker<
|
| + BindState<RepeatingCallback<Signature>, BoundArgs...>>
|
| + : CallbackCancellationChecker<
|
| + BindState<RepeatingCallback<Signature>, BoundArgs...>> {};
|
| +
|
| // BindState<>
|
| //
|
| // This stores all the state passed into Bind().
|
|
|