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

Unified Diff: base/callback_internal.cc

Issue 8914022: Revert 114494 - Remove BindStateHolder and have Bind() return a Callback<> object directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « base/callback_internal.h ('k') | base/callback_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_internal.cc
===================================================================
--- base/callback_internal.cc (revision 114494)
+++ base/callback_internal.cc (working copy)
@@ -4,8 +4,6 @@
#include "base/callback_internal.h"
-#include "base/logging.h"
-
namespace base {
namespace internal {
@@ -23,10 +21,12 @@
polymorphic_invoke_ == other.polymorphic_invoke_;
}
-CallbackBase::CallbackBase(BindStateBase* bind_state)
- : bind_state_(bind_state),
- polymorphic_invoke_(NULL) {
- DCHECK(!bind_state_ || bind_state_->HasOneRef());
+CallbackBase::CallbackBase(InvokeFuncStorage polymorphic_invoke,
+ scoped_refptr<BindStateBase>* bind_state)
+ : polymorphic_invoke_(polymorphic_invoke) {
+ if (bind_state) {
+ bind_state_.swap(*bind_state);
+ }
}
CallbackBase::~CallbackBase() {
« no previous file with comments | « base/callback_internal.h ('k') | base/callback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698