Index: base/bind_helpers.h |
diff --git a/base/bind_helpers.h b/base/bind_helpers.h |
index d7ddb2c49bab76629c952d132b30d9b6263b8a4c..4cd1309ff4ab54a7d6ff4fafc8a7fe193b721f45 100644 |
--- a/base/bind_helpers.h |
+++ b/base/bind_helpers.h |
@@ -277,6 +277,11 @@ template <typename T> |
T* Unwrap(const scoped_refptr<T>& o) { return o.get(); } |
template <typename T> |
+PassScopedPtr<T> Unwrap(subtle::PassScopedPtrAnchor<T>& o) { |
+ return PassScopedPtr<T>(&o); |
+} |
+ |
+template <typename T> |
const WeakPtr<T>& Unwrap(const WeakPtr<T>& o) { return o; } |
template <typename T> |
@@ -302,6 +307,12 @@ struct MaybeRefcount<base::false_type, T[n]> { |
}; |
template <typename T> |
+struct MaybeRefcount<base::false_type, subtle::TransientPassScopedPtr<T> > { |
+ static void AddRef(const subtle::PassScopedPtrAnchor<T>&) {} |
+ static void Release(const subtle::PassScopedPtrAnchor<T>&) {} |
+}; |
+ |
+template <typename T> |
struct MaybeRefcount<base::true_type, T*> { |
static void AddRef(T* o) { o->AddRef(); } |
static void Release(T* o) { o->Release(); } |
@@ -334,6 +345,12 @@ struct MaybeRefcount<base::true_type, const T*> { |
}; |
template <typename T> |
+struct MaybeRefcount<base::true_type, subtle::TransientPassScopedPtr<T> > { |
+ static void AddRef(const subtle::PassScopedPtrAnchor<T>&) {} |
+ static void Release(const subtle::PassScopedPtrAnchor<T>&) {} |
+}; |
+ |
+template <typename T> |
struct MaybeRefcount<base::true_type, WeakPtr<T> > { |
static void AddRef(const WeakPtr<T>&) {} |
static void Release(const WeakPtr<T>&) {} |