Index: base/bind_helpers.h |
diff --git a/base/bind_helpers.h b/base/bind_helpers.h |
index 1d5c7ca1e3df1c1fb5582b3f287a64c5897a031f..3834e4debb329f657b290a2309cda388379eb09f 100644 |
--- a/base/bind_helpers.h |
+++ b/base/bind_helpers.h |
@@ -322,6 +322,25 @@ struct UnwrapTraits<WeakPtr<T> > { |
static ForwardType Unwrap(const WeakPtr<T>& o) { return o; } |
}; |
+/* |
+template <typename T> |
+struct UnwrapTraits<subtle::PassScopedPtrAnchor<T> > { |
+ typedef PassScopedPtr<T> ForwardType; |
+ static PassScopedPtr<T> Unwrap(subtle::PassScopedPtrAnchor<T>& o) { |
+ return &o; |
+ } |
+}; |
+*/ |
+ |
+template <typename T> |
+struct UnwrapTraits<subtle::PassScopedPtrAnchor<T> > { |
+ typedef subtle::PassScopedPtrAnchor<T>* ForwardType; |
+ static subtle::PassScopedPtrAnchor<T>* |
+ Unwrap(subtle::PassScopedPtrAnchor<T>& o) { |
+ return &o; |
+ } |
+}; |
+ |
template <typename T> |
struct UnwrapTraits<OwnedWrapper<T> > { |
typedef T* ForwardType; |
@@ -348,6 +367,12 @@ struct MaybeRefcount<false, T[n]> { |
}; |
template <typename T> |
+struct MaybeRefcount<false, PassScopedPtr<T> > { |
+ static void AddRef(const subtle::PassScopedPtrAnchor<T>&) {} |
+ static void Release(const subtle::PassScopedPtrAnchor<T>&) {} |
+}; |
+ |
+template <typename T> |
struct MaybeRefcount<true, T*> { |
static void AddRef(T* o) { o->AddRef(); } |
static void Release(T* o) { o->Release(); } |
@@ -380,6 +405,12 @@ struct MaybeRefcount<true, const T*> { |
}; |
template <typename T> |
+struct MaybeRefcount<true, PassScopedPtr<T> > { |
+ static void AddRef(const subtle::PassScopedPtrAnchor<T>&) {} |
+ static void Release(const subtle::PassScopedPtrAnchor<T>&) {} |
+}; |
+ |
+template <typename T> |
struct MaybeRefcount<true, WeakPtr<T> > { |
static void AddRef(const WeakPtr<T>&) {} |
static void Release(const WeakPtr<T>&) {} |