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

Unified Diff: base/callback_internal.h

Issue 1507143003: Clean up base::Callback stuff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
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
« base/callback.h ('K') | « base/callback_forward.h ('k') | base/callback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698