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

Unified Diff: base/callback_list_unittest.nc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 months 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/callback_list_unittest.cc ('k') | base/callback_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_list_unittest.nc
diff --git a/base/callback_list_unittest.nc b/base/callback_list_unittest.nc
index ef193f4ee368728c257fdf9bd8f6c1427de728a9..0ddc135eaa8f89048a63d9ef3892e2bc7f5d37c2 100644
--- a/base/callback_list_unittest.nc
+++ b/base/callback_list_unittest.nc
@@ -7,12 +7,12 @@
#include "base/callback_list.h"
+#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
namespace base {
@@ -26,9 +26,9 @@ class FooListener {
public:
FooListener() {}
- void GotAScopedFoo(scoped_ptr<Foo> f) { foo_ = std::move(f); }
+ void GotAScopedFoo(std::unique_ptr<Foo> f) { foo_ = std::move(f); }
- scoped_ptr<Foo> foo_;
+ std::unique_ptr<Foo> foo_;
private:
DISALLOW_COPY_AND_ASSIGN(FooListener);
@@ -45,10 +45,10 @@ class FooListener {
// first callback has been run.
void WontCompile() {
FooListener f;
- CallbackList<void(scoped_ptr<Foo>)> c1;
- scoped_ptr<CallbackList<void(scoped_ptr<Foo>)>::Subscription> sub =
+ CallbackList<void(std::unique_ptr<Foo>)> c1;
+ std::unique_ptr<CallbackList<void(std::unique_ptr<Foo>)>::Subscription> sub =
c1.Add(Bind(&FooListener::GotAScopedFoo, Unretained(&f)));
- c1.Notify(scoped_ptr<Foo>(new Foo()));
+ c1.Notify(std::unique_ptr<Foo>(new Foo()));
}
#endif
« no previous file with comments | « base/callback_list_unittest.cc ('k') | base/callback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698