Index: base/callback_list.h |
diff --git a/base/callback_list.h b/base/callback_list.h |
index 7d6a478e8ce067338dfae8917a5cde7440cf9dae..848c900c6acdaf064a664ed021197dff723d89c0 100644 |
--- a/base/callback_list.h |
+++ b/base/callback_list.h |
@@ -6,13 +6,13 @@ |
#define BASE_CALLBACK_LIST_H_ |
#include <list> |
+#include <memory> |
#include "base/callback.h" |
#include "base/callback_internal.h" |
#include "base/compiler_specific.h" |
#include "base/logging.h" |
#include "base/macros.h" |
-#include "base/memory/scoped_ptr.h" |
// OVERVIEW: |
// |
@@ -29,7 +29,7 @@ |
// |
// typedef base::Callback<void(const Foo&)> OnFooCallback; |
// |
-// scoped_ptr<base::CallbackList<void(const Foo&)>::Subscription> |
+// std::unique_ptr<base::CallbackList<void(const Foo&)>::Subscription> |
// RegisterCallback(const OnFooCallback& cb) { |
// return callback_list_.Add(cb); |
// } |
@@ -62,7 +62,7 @@ |
// // Do something. |
// } |
// |
-// scoped_ptr<base::CallbackList<void(const Foo&)>::Subscription> |
+// std::unique_ptr<base::CallbackList<void(const Foo&)>::Subscription> |
// foo_subscription_; |
// |
// DISALLOW_COPY_AND_ASSIGN(MyWidgetListener); |
@@ -103,9 +103,9 @@ class CallbackListBase { |
// Add a callback to the list. The callback will remain registered until the |
// returned Subscription is destroyed, which must occur before the |
// CallbackList is destroyed. |
- scoped_ptr<Subscription> Add(const CallbackType& cb) WARN_UNUSED_RESULT { |
+ std::unique_ptr<Subscription> Add(const CallbackType& cb) WARN_UNUSED_RESULT { |
DCHECK(!cb.is_null()); |
- return scoped_ptr<Subscription>( |
+ return std::unique_ptr<Subscription>( |
new Subscription(this, callbacks_.insert(callbacks_.end(), cb))); |
} |