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

Unified Diff: base/callback_internal.cc

Issue 8738001: Remove BindStateHolder and have Bind() return a Callback<> object directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix callback_unittest.cc Created 9 years, 1 month 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.cc
diff --git a/base/callback_internal.cc b/base/callback_internal.cc
index 582fbdc12c43b520f81e5684c3dde02072e476ea..abfdc736a1bc870a9b84256bb32c209518635679 100644
--- a/base/callback_internal.cc
+++ b/base/callback_internal.cc
@@ -21,12 +21,9 @@ bool CallbackBase::Equals(const CallbackBase& other) const {
polymorphic_invoke_ == other.polymorphic_invoke_;
}
-CallbackBase::CallbackBase(InvokeFuncStorage polymorphic_invoke,
- scoped_refptr<BindStateBase>* bind_state)
- : polymorphic_invoke_(polymorphic_invoke) {
- if (bind_state) {
- bind_state_.swap(*bind_state);
- }
+CallbackBase::CallbackBase(BindStateBase* bind_state)
+ : bind_state_(bind_state),
akalin 2011/12/02 18:54:45 This constructor should only be called with a newl
awong 2011/12/06 00:21:12 Added a DCHECK, though it feels slightly overkill
+ polymorphic_invoke_(NULL) {
}
CallbackBase::~CallbackBase() {

Powered by Google App Engine
This is Rietveld 408576698