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

Unified Diff: base/bind.h.pump

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/bind.h ('k') | base/bind_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind.h.pump
===================================================================
--- base/bind.h.pump (revision 114494)
+++ base/bind.h.pump (working copy)
@@ -71,12 +71,11 @@
template <typename Functor[[]]
$if ARITY > 0 [[, ]] $for ARG , [[typename P$(ARG)]]>
-base::Callback<
- typename internal::BindState<
+internal::BindStateHolder<
+ internal::BindState<
typename internal::FunctorTraits<Functor>::RunnableType,
typename internal::FunctorTraits<Functor>::RunType,
- void($for ARG , [[typename internal::CallbackParamTraits<P$(ARG)>::StorageType]])>
- ::UnboundRunType>
+ void($for ARG , [[typename internal::CallbackParamTraits<P$(ARG)>::StorageType]])> >
Bind(Functor functor
$if ARITY > 0 [[, ]] $for ARG , [[const P$(ARG)& p$(ARG)]]) {
// Typedefs for how to store and run the functor.
@@ -126,13 +125,11 @@
]] $$ $for ARG
- typedef internal::BindState<RunnableType, RunType, [[]]
-void($for ARG , [[typename internal::CallbackParamTraits<P$(ARG)>::StorageType]])> [[]]
-BindState;
-
- return Callback<typename BindState::UnboundRunType>(
- new BindState(internal::MakeRunnable(functor)[[]]
+ return internal::MakeBindStateHolder(
+ new internal::BindState<RunnableType, RunType, [[]]
+void($for ARG , [[typename internal::CallbackParamTraits<P$(ARG)>::StorageType]])>(
+ internal::MakeRunnable(functor)[[]]
$if ARITY > 0 [[, ]] $for ARG , [[p$(ARG)]]));
}
« no previous file with comments | « base/bind.h ('k') | base/bind_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698