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

Unified Diff: base/task_runner_util_unittest.cc

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/system_monitor/system_monitor_unittest.cc ('k') | base/task_scheduler/priority_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_runner_util_unittest.cc
diff --git a/base/task_runner_util_unittest.cc b/base/task_runner_util_unittest.cc
index 0a4f22e5ae82371e2e5a3f192e90f7b84b120c86..1df54362c825b678c87c41b42d492fffcc17b9a6 100644
--- a/base/task_runner_util_unittest.cc
+++ b/base/task_runner_util_unittest.cc
@@ -36,13 +36,13 @@ struct Foo {
}
};
-scoped_ptr<Foo> CreateFoo() {
- return scoped_ptr<Foo>(new Foo);
+std::unique_ptr<Foo> CreateFoo() {
+ return std::unique_ptr<Foo>(new Foo);
}
-void ExpectFoo(scoped_ptr<Foo> foo) {
+void ExpectFoo(std::unique_ptr<Foo> foo) {
EXPECT_TRUE(foo.get());
- scoped_ptr<Foo> local_foo(std::move(foo));
+ std::unique_ptr<Foo> local_foo(std::move(foo));
EXPECT_TRUE(local_foo.get());
EXPECT_FALSE(foo.get());
}
@@ -54,13 +54,13 @@ struct FooDeleter {
};
};
-scoped_ptr<Foo, FooDeleter> CreateScopedFoo() {
- return scoped_ptr<Foo, FooDeleter>(new Foo);
+std::unique_ptr<Foo, FooDeleter> CreateScopedFoo() {
+ return std::unique_ptr<Foo, FooDeleter>(new Foo);
}
-void ExpectScopedFoo(scoped_ptr<Foo, FooDeleter> foo) {
+void ExpectScopedFoo(std::unique_ptr<Foo, FooDeleter> foo) {
EXPECT_TRUE(foo.get());
- scoped_ptr<Foo, FooDeleter> local_foo(std::move(foo));
+ std::unique_ptr<Foo, FooDeleter> local_foo(std::move(foo));
EXPECT_TRUE(local_foo.get());
EXPECT_FALSE(foo.get());
}
« no previous file with comments | « base/system_monitor/system_monitor_unittest.cc ('k') | base/task_scheduler/priority_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698