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

Unified Diff: mojo/message_pump/handle_watcher_unittest.cc

Issue 2069663002: Some scoped_ptr -> std::unique_ptr conversion, especially under //mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 | « mojo/message_pump/handle_watcher.h ('k') | mojo/message_pump/message_pump_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/message_pump/handle_watcher_unittest.cc
diff --git a/mojo/message_pump/handle_watcher_unittest.cc b/mojo/message_pump/handle_watcher_unittest.cc
index 54deb07a53e685687b31995733c8ab6e66f970cc..b8a78c1f73fe93aa818ff0518fba1b8f50db99c4 100644
--- a/mojo/message_pump/handle_watcher_unittest.cc
+++ b/mojo/message_pump/handle_watcher_unittest.cc
@@ -48,8 +48,8 @@ void DeleteWatcherAndForwardResult(
next_callback.Run(result);
}
-scoped_ptr<base::MessageLoop> CreateMessageLoop(MessageLoopConfig config) {
- scoped_ptr<base::MessageLoop> loop;
+std::unique_ptr<base::MessageLoop> CreateMessageLoop(MessageLoopConfig config) {
+ std::unique_ptr<base::MessageLoop> loop;
if (config == MESSAGE_LOOP_CONFIG_DEFAULT)
loop.reset(new base::MessageLoop());
else
@@ -138,7 +138,7 @@ class HandleWatcherTest : public testing::TestWithParam<MessageLoopConfig> {
private:
base::ShadowingAtExitManager at_exit_;
- scoped_ptr<base::MessageLoop> message_loop_;
+ std::unique_ptr<base::MessageLoop> message_loop_;
DISALLOW_COPY_AND_ASSIGN(HandleWatcherTest);
};
@@ -420,7 +420,7 @@ void RunStressTest(int count,
callback_helper.RunUntilGotCallback();
EXPECT_TRUE(callback_helper.got_callback());
} else {
- scoped_ptr<TestData> test_data(new TestData);
+ std::unique_ptr<TestData> test_data(new TestData);
ASSERT_TRUE(test_data->pipe.handle0.is_valid());
test_data->watcher.Start(test_data->pipe.handle0.get(),
MOJO_HANDLE_SIGNAL_READABLE,
@@ -457,7 +457,7 @@ TEST(HandleWatcherCleanEnvironmentTest, StressTest) {
// Starts the threads first and then post the task in hopes of having more
// threads running at once.
for (int i = 0; i < kThreadCount; ++i) {
- scoped_ptr<base::Thread> thread(new base::Thread("test thread"));
+ std::unique_ptr<base::Thread> thread(new base::Thread("test thread"));
if (i % 2) {
base::Thread::Options thread_options;
thread_options.message_pump_factory =
« no previous file with comments | « mojo/message_pump/handle_watcher.h ('k') | mojo/message_pump/message_pump_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698