Chromium Code Reviews| Index: base/callback_internal.h |
| diff --git a/base/callback_internal.h b/base/callback_internal.h |
| index aa8542cf48f9b316e4cc1b4c7963b431b81ed584..2f6e22c2cd1b343b7c77ec5919ccec1592d8394c 100644 |
| --- a/base/callback_internal.h |
| +++ b/base/callback_internal.h |
| @@ -67,6 +67,9 @@ class BASE_EXPORT CallbackBase { |
| // Returns the Callback into an uninitialized state. |
| void Reset(); |
| + // Returns true if this callback equals |other|. |other| may be null. |
| + bool Equals(const CallbackBase& other) const; |
|
dcheng
2015/12/08 20:16:46
I'm curious: do you know why we didn't just do thi
danakj
2015/12/08 22:12:59
Does this allow comparison of
Callback<void(int)>
tzik
2015/12/09 07:03:15
Ah, yes. Let me revert this part, that is an unint
|
| + |
| protected: |
| // In C++, it is safe to cast function pointers to function pointers of |
| // another type. It is not okay to use void*. We create a InvokeFuncStorage |
| @@ -74,9 +77,6 @@ class BASE_EXPORT CallbackBase { |
| // the original type on usage. |
| typedef void(*InvokeFuncStorage)(void); |
| - // Returns true if this callback equals |other|. |other| may be null. |
| - bool Equals(const CallbackBase& other) const; |
| - |
| // Allow initializing of |bind_state_| via the constructor to avoid default |
| // initialization of the scoped_refptr. We do not also initialize |
| // |polymorphic_invoke_| here because doing a normal assignment in the |