| Index: base/tuple.h
 | 
| diff --git a/base/tuple.h b/base/tuple.h
 | 
| index 04809d9bdb096112966a6e7e8fba0145367d2197..12f7f84ea50b79e4a0f92c1cb47ae0e2319a1d4a 100644
 | 
| --- a/base/tuple.h
 | 
| +++ b/base/tuple.h
 | 
| @@ -29,6 +29,8 @@
 | 
|  #ifndef BASE_TUPLE_H__
 | 
|  #define BASE_TUPLE_H__
 | 
|  
 | 
| +#include "base/bind_helpers.h"
 | 
| +
 | 
|  // Traits ----------------------------------------------------------------------
 | 
|  //
 | 
|  // A simple traits class for tuple arguments.
 | 
| @@ -538,58 +540,86 @@ inline void DispatchToMethod(ObjT* obj, Method method, const Tuple0& arg) {
 | 
|  
 | 
|  template <class ObjT, class Method, class A>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) {
 | 
| -  (obj->*method)(arg);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg));
 | 
|  }
 | 
|  
 | 
|  template <class ObjT, class Method, class A>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1<A>& arg) {
 | 
| -  (obj->*method)(arg.a);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B>
 | 
|  inline void DispatchToMethod(ObjT* obj,
 | 
|                               Method method,
 | 
|                               const Tuple2<A, B>& arg) {
 | 
| -  (obj->*method)(arg.a, arg.b);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple3<A, B, C>& arg) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C, class D>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple4<A, B, C, D>& arg) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c, arg.d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +                 base::internal::UnwrapTraits<D>::Unwrap(arg.d));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C, class D, class E>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple5<A, B, C, D, E>& arg) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +                 base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +                 base::internal::UnwrapTraits<E>::Unwrap(arg.e));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C, class D, class E,
 | 
|           class F>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple6<A, B, C, D, E, F>& arg) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +                 base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +                 base::internal::UnwrapTraits<E>::Unwrap(arg.e),
 | 
| +                 base::internal::UnwrapTraits<F>::Unwrap(arg.f));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C, class D, class E,
 | 
|           class F, class G>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple7<A, B, C, D, E, F, G>& arg) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +                 base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +                 base::internal::UnwrapTraits<E>::Unwrap(arg.e),
 | 
| +                 base::internal::UnwrapTraits<F>::Unwrap(arg.f),
 | 
| +                 base::internal::UnwrapTraits<G>::Unwrap(arg.g));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C, class D, class E,
 | 
|           class F, class G, class H>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple8<A, B, C, D, E, F, G, H>& arg) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g, arg.h);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +                 base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +                 base::internal::UnwrapTraits<E>::Unwrap(arg.e),
 | 
| +                 base::internal::UnwrapTraits<F>::Unwrap(arg.f),
 | 
| +                 base::internal::UnwrapTraits<G>::Unwrap(arg.g),
 | 
| +                 base::internal::UnwrapTraits<H>::Unwrap(arg.h));
 | 
|  }
 | 
|  
 | 
|  // Static Dispatchers with no out params.
 | 
| @@ -606,49 +636,77 @@ inline void DispatchToFunction(Function function, const A& arg) {
 | 
|  
 | 
|  template <class Function, class A>
 | 
|  inline void DispatchToFunction(Function function, const Tuple1<A>& arg) {
 | 
| -  (*function)(arg.a);
 | 
| +  (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a));
 | 
|  }
 | 
|  
 | 
|  template<class Function, class A, class B>
 | 
|  inline void DispatchToFunction(Function function, const Tuple2<A, B>& arg) {
 | 
| -  (*function)(arg.a, arg.b);
 | 
| +  (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +              base::internal::UnwrapTraits<B>::Unwrap(arg.b));
 | 
|  }
 | 
|  
 | 
|  template<class Function, class A, class B, class C>
 | 
|  inline void DispatchToFunction(Function function, const Tuple3<A, B, C>& arg) {
 | 
| -  (*function)(arg.a, arg.b, arg.c);
 | 
| +  (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +              base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +              base::internal::UnwrapTraits<C>::Unwrap(arg.c));
 | 
|  }
 | 
|  
 | 
|  template<class Function, class A, class B, class C, class D>
 | 
|  inline void DispatchToFunction(Function function,
 | 
|                                 const Tuple4<A, B, C, D>& arg) {
 | 
| -  (*function)(arg.a, arg.b, arg.c, arg.d);
 | 
| +  (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +              base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +              base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +              base::internal::UnwrapTraits<D>::Unwrap(arg.d));
 | 
|  }
 | 
|  
 | 
|  template<class Function, class A, class B, class C, class D, class E>
 | 
|  inline void DispatchToFunction(Function function,
 | 
|                                 const Tuple5<A, B, C, D, E>& arg) {
 | 
| -  (*function)(arg.a, arg.b, arg.c, arg.d, arg.e);
 | 
| +  (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +              base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +              base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +              base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +              base::internal::UnwrapTraits<E>::Unwrap(arg.e));
 | 
|  }
 | 
|  
 | 
|  template<class Function, class A, class B, class C, class D, class E, class F>
 | 
|  inline void DispatchToFunction(Function function,
 | 
|                                 const Tuple6<A, B, C, D, E, F>& arg) {
 | 
| -  (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f);
 | 
| +  (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +              base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +              base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +              base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +              base::internal::UnwrapTraits<E>::Unwrap(arg.e),
 | 
| +              base::internal::UnwrapTraits<F>::Unwrap(arg.f));
 | 
|  }
 | 
|  
 | 
|  template<class Function, class A, class B, class C, class D, class E, class F,
 | 
|           class G>
 | 
|  inline void DispatchToFunction(Function function,
 | 
|                                 const Tuple7<A, B, C, D, E, F, G>& arg) {
 | 
| -  (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g);
 | 
| +  (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +              base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +              base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +              base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +              base::internal::UnwrapTraits<E>::Unwrap(arg.e),
 | 
| +              base::internal::UnwrapTraits<F>::Unwrap(arg.f),
 | 
| +              base::internal::UnwrapTraits<G>::Unwrap(arg.g));
 | 
|  }
 | 
|  
 | 
|  template<class Function, class A, class B, class C, class D, class E, class F,
 | 
|           class G, class H>
 | 
|  inline void DispatchToFunction(Function function,
 | 
|                                 const Tuple8<A, B, C, D, E, F, G, H>& arg) {
 | 
| -  (*function)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f, arg.g, arg.h);
 | 
| +  (*function)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +              base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +              base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +              base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +              base::internal::UnwrapTraits<E>::Unwrap(arg.e),
 | 
| +              base::internal::UnwrapTraits<F>::Unwrap(arg.f),
 | 
| +              base::internal::UnwrapTraits<G>::Unwrap(arg.g),
 | 
| +              base::internal::UnwrapTraits<H>::Unwrap(arg.h));
 | 
|  }
 | 
|  
 | 
|  // Dispatchers with 0 out param (as a Tuple0).
 | 
| @@ -662,46 +720,61 @@ inline void DispatchToMethod(ObjT* obj,
 | 
|  
 | 
|  template <class ObjT, class Method, class A>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method, const A& arg, Tuple0*) {
 | 
| -  (obj->*method)(arg);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg));
 | 
|  }
 | 
|  
 | 
|  template <class ObjT, class Method, class A>
 | 
|  inline void DispatchToMethod(ObjT* obj,
 | 
|                               Method method,
 | 
|                               const Tuple1<A>& arg, Tuple0*) {
 | 
| -  (obj->*method)(arg.a);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B>
 | 
|  inline void DispatchToMethod(ObjT* obj,
 | 
|                               Method method,
 | 
|                               const Tuple2<A, B>& arg, Tuple0*) {
 | 
| -  (obj->*method)(arg.a, arg.b);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple3<A, B, C>& arg, Tuple0*) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C, class D>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple4<A, B, C, D>& arg, Tuple0*) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c, arg.d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +                 base::internal::UnwrapTraits<D>::Unwrap(arg.d));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C, class D, class E>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple5<A, B, C, D, E>& arg, Tuple0*) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +                 base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +                 base::internal::UnwrapTraits<E>::Unwrap(arg.e));
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class A, class B, class C, class D, class E,
 | 
|           class F>
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple6<A, B, C, D, E, F>& arg, Tuple0*) {
 | 
| -  (obj->*method)(arg.a, arg.b, arg.c, arg.d, arg.e, arg.f);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<A>::Unwrap(arg.a),
 | 
| +                 base::internal::UnwrapTraits<B>::Unwrap(arg.b),
 | 
| +                 base::internal::UnwrapTraits<C>::Unwrap(arg.c),
 | 
| +                 base::internal::UnwrapTraits<D>::Unwrap(arg.d),
 | 
| +                 base::internal::UnwrapTraits<E>::Unwrap(arg.e),
 | 
| +                 base::internal::UnwrapTraits<F>::Unwrap(arg.f));
 | 
|  }
 | 
|  
 | 
|  // Dispatchers with 1 out param.
 | 
| @@ -727,7 +800,7 @@ template<class ObjT, class Method, class InA,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple1<InA>& in,
 | 
|                               Tuple1<OutA>* out) {
 | 
| -  (obj->*method)(in.a, &out->a);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB,
 | 
| @@ -735,7 +808,9 @@ template<class ObjT, class Method, class InA, class InB,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple2<InA, InB>& in,
 | 
|                               Tuple1<OutA>* out) {
 | 
| -  (obj->*method)(in.a, in.b, &out->a);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 &out->a);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC,
 | 
| @@ -743,7 +818,10 @@ template<class ObjT, class Method, class InA, class InB, class InC,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple3<InA, InB, InC>& in,
 | 
|                               Tuple1<OutA>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, &out->a);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 &out->a);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
| @@ -751,7 +829,11 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple4<InA, InB, InC, InD>& in,
 | 
|                               Tuple1<OutA>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, &out->a);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 &out->a);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
| @@ -759,7 +841,12 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple5<InA, InB, InC, InD, InE>& in,
 | 
|                               Tuple1<OutA>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 &out->a);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method,
 | 
| @@ -768,7 +855,13 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple6<InA, InB, InC, InD, InE, InF>& in,
 | 
|                               Tuple1<OutA>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 base::internal::UnwrapTraits<InF>::Unwrap(in.f),
 | 
| +                 &out->a);
 | 
|  }
 | 
|  
 | 
|  // Dispatchers with 2 out params.
 | 
| @@ -794,7 +887,8 @@ template<class ObjT, class Method, class InA,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple1<InA>& in,
 | 
|                               Tuple2<OutA, OutB>* out) {
 | 
| -  (obj->*method)(in.a, &out->a, &out->b);
 | 
| +  (obj->*method)(
 | 
| +      base::internal::UnwrapTraits<InA>::Unwrap(in.a), &out->a, &out->b);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB,
 | 
| @@ -802,7 +896,10 @@ template<class ObjT, class Method, class InA, class InB,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple2<InA, InB>& in,
 | 
|                               Tuple2<OutA, OutB>* out) {
 | 
| -  (obj->*method)(in.a, in.b, &out->a, &out->b);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 &out->a,
 | 
| +                 &out->b);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC,
 | 
| @@ -810,7 +907,11 @@ template<class ObjT, class Method, class InA, class InB, class InC,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple3<InA, InB, InC>& in,
 | 
|                               Tuple2<OutA, OutB>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, &out->a, &out->b);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 &out->a,
 | 
| +                 &out->b);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
| @@ -818,7 +919,12 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple4<InA, InB, InC, InD>& in,
 | 
|                               Tuple2<OutA, OutB>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 &out->a,
 | 
| +                 &out->b);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method,
 | 
| @@ -827,7 +933,13 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple5<InA, InB, InC, InD, InE>& in,
 | 
|                               Tuple2<OutA, OutB>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a, &out->b);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 &out->a,
 | 
| +                 &out->b);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method,
 | 
| @@ -836,7 +948,14 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple6<InA, InB, InC, InD, InE, InF>& in,
 | 
|                               Tuple2<OutA, OutB>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a, &out->b);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 base::internal::UnwrapTraits<InF>::Unwrap(in.f),
 | 
| +                 &out->a,
 | 
| +                 &out->b);
 | 
|  }
 | 
|  
 | 
|  // Dispatchers with 3 out params.
 | 
| @@ -862,7 +981,10 @@ template<class ObjT, class Method, class InA,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple1<InA>& in,
 | 
|                               Tuple3<OutA, OutB, OutC>* out) {
 | 
| -  (obj->*method)(in.a, &out->a, &out->b, &out->c);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB,
 | 
| @@ -870,7 +992,11 @@ template<class ObjT, class Method, class InA, class InB,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple2<InA, InB>& in,
 | 
|                               Tuple3<OutA, OutB, OutC>* out) {
 | 
| -  (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC,
 | 
| @@ -878,7 +1004,12 @@ template<class ObjT, class Method, class InA, class InB, class InC,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple3<InA, InB, InC>& in,
 | 
|                               Tuple3<OutA, OutB, OutC>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
| @@ -886,7 +1017,13 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple4<InA, InB, InC, InD>& in,
 | 
|                               Tuple3<OutA, OutB, OutC>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method,
 | 
| @@ -895,7 +1032,14 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple5<InA, InB, InC, InD, InE>& in,
 | 
|                               Tuple3<OutA, OutB, OutC>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e, &out->a, &out->b, &out->c);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method,
 | 
| @@ -904,7 +1048,15 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple6<InA, InB, InC, InD, InE, InF>& in,
 | 
|                               Tuple3<OutA, OutB, OutC>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, &out->a, &out->b, &out->c);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 base::internal::UnwrapTraits<InF>::Unwrap(in.f),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c);
 | 
|  }
 | 
|  
 | 
|  // Dispatchers with 4 out params.
 | 
| @@ -922,7 +1074,11 @@ template<class ObjT, class Method, class InA,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const InA& in,
 | 
|                               Tuple4<OutA, OutB, OutC, OutD>* out) {
 | 
| -  (obj->*method)(in, &out->a, &out->b, &out->c, &out->d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA,
 | 
| @@ -930,7 +1086,11 @@ template<class ObjT, class Method, class InA,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple1<InA>& in,
 | 
|                               Tuple4<OutA, OutB, OutC, OutD>* out) {
 | 
| -  (obj->*method)(in.a, &out->a, &out->b, &out->c, &out->d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB,
 | 
| @@ -938,7 +1098,12 @@ template<class ObjT, class Method, class InA, class InB,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple2<InA, InB>& in,
 | 
|                               Tuple4<OutA, OutB, OutC, OutD>* out) {
 | 
| -  (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c, &out->d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC,
 | 
| @@ -946,7 +1111,13 @@ template<class ObjT, class Method, class InA, class InB, class InC,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple3<InA, InB, InC>& in,
 | 
|                               Tuple4<OutA, OutB, OutC, OutD>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c, &out->d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
| @@ -954,7 +1125,14 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple4<InA, InB, InC, InD>& in,
 | 
|                               Tuple4<OutA, OutB, OutC, OutD>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c, &out->d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method,
 | 
| @@ -963,8 +1141,15 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple5<InA, InB, InC, InD, InE>& in,
 | 
|                               Tuple4<OutA, OutB, OutC, OutD>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e,
 | 
| -                 &out->a, &out->b, &out->c, &out->d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method,
 | 
| @@ -973,8 +1158,16 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple6<InA, InB, InC, InD, InE, InF>& in,
 | 
|                               Tuple4<OutA, OutB, OutC, OutD>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f,
 | 
| -                 &out->a, &out->b, &out->c, &out->d);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 base::internal::UnwrapTraits<InF>::Unwrap(in.f),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d);
 | 
|  }
 | 
|  
 | 
|  // Dispatchers with 5 out params.
 | 
| @@ -992,7 +1185,12 @@ template<class ObjT, class Method, class InA,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const InA& in,
 | 
|                               Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
 | 
| -  (obj->*method)(in, &out->a, &out->b, &out->c, &out->d, &out->e);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d,
 | 
| +                 &out->e);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA,
 | 
| @@ -1000,7 +1198,12 @@ template<class ObjT, class Method, class InA,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple1<InA>& in,
 | 
|                               Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
 | 
| -  (obj->*method)(in.a, &out->a, &out->b, &out->c, &out->d, &out->e);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d,
 | 
| +                 &out->e);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB,
 | 
| @@ -1008,7 +1211,13 @@ template<class ObjT, class Method, class InA, class InB,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple2<InA, InB>& in,
 | 
|                               Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
 | 
| -  (obj->*method)(in.a, in.b, &out->a, &out->b, &out->c, &out->d, &out->e);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d,
 | 
| +                 &out->e);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC,
 | 
| @@ -1016,7 +1225,14 @@ template<class ObjT, class Method, class InA, class InB, class InC,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple3<InA, InB, InC>& in,
 | 
|                               Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, &out->a, &out->b, &out->c, &out->d, &out->e);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d,
 | 
| +                 &out->e);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
| @@ -1024,7 +1240,14 @@ template<class ObjT, class Method, class InA, class InB, class InC, class InD,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple4<InA, InB, InC, InD>& in,
 | 
|                               Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, &out->a, &out->b, &out->c, &out->d,
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d,
 | 
|                   &out->e);
 | 
|  }
 | 
|  
 | 
| @@ -1034,8 +1257,16 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple5<InA, InB, InC, InD, InE>& in,
 | 
|                               Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e,
 | 
| -                 &out->a, &out->b, &out->c, &out->d, &out->e);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d,
 | 
| +                 &out->e);
 | 
|  }
 | 
|  
 | 
|  template<class ObjT, class Method,
 | 
| @@ -1044,8 +1275,17 @@ template<class ObjT, class Method,
 | 
|  inline void DispatchToMethod(ObjT* obj, Method method,
 | 
|                               const Tuple6<InA, InB, InC, InD, InE, InF>& in,
 | 
|                               Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
 | 
| -  (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f,
 | 
| -                 &out->a, &out->b, &out->c, &out->d, &out->e);
 | 
| +  (obj->*method)(base::internal::UnwrapTraits<InA>::Unwrap(in.a),
 | 
| +                 base::internal::UnwrapTraits<InB>::Unwrap(in.b),
 | 
| +                 base::internal::UnwrapTraits<InC>::Unwrap(in.c),
 | 
| +                 base::internal::UnwrapTraits<InD>::Unwrap(in.d),
 | 
| +                 base::internal::UnwrapTraits<InE>::Unwrap(in.e),
 | 
| +                 base::internal::UnwrapTraits<InF>::Unwrap(in.f),
 | 
| +                 &out->a,
 | 
| +                 &out->b,
 | 
| +                 &out->c,
 | 
| +                 &out->d,
 | 
| +                 &out->e);
 | 
|  }
 | 
|  
 | 
|  #endif  // BASE_TUPLE_H__
 | 
| 
 |