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

Unified Diff: base/threading/thread.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/threading/thread.h ('k') | base/threading/thread_checker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread.cc
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index 1d2ae6462c2e46aa044a0369a90b992354b654d5..58631301dda1bb797a1d4320d0a9b4ffcf4e5aab 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -104,8 +104,8 @@ bool Thread::StartWithOptions(const Options& options) {
type = MessageLoop::TYPE_CUSTOM;
message_loop_timer_slack_ = options.timer_slack;
- scoped_ptr<MessageLoop> message_loop = MessageLoop::CreateUnbound(
- type, options.message_pump_factory);
+ std::unique_ptr<MessageLoop> message_loop =
+ MessageLoop::CreateUnbound(type, options.message_pump_factory);
message_loop_ = message_loop.get();
start_event_.Reset();
@@ -227,13 +227,13 @@ void Thread::ThreadMain() {
// Lazily initialize the message_loop so that it can run on this thread.
DCHECK(message_loop_);
- scoped_ptr<MessageLoop> message_loop(message_loop_);
+ std::unique_ptr<MessageLoop> message_loop(message_loop_);
message_loop_->BindToCurrentThread();
message_loop_->set_thread_name(name_);
message_loop_->SetTimerSlack(message_loop_timer_slack_);
#if defined(OS_WIN)
- scoped_ptr<win::ScopedCOMInitializer> com_initializer;
+ std::unique_ptr<win::ScopedCOMInitializer> com_initializer;
if (com_status_ != NONE) {
com_initializer.reset((com_status_ == STA) ?
new win::ScopedCOMInitializer() :
« no previous file with comments | « base/threading/thread.h ('k') | base/threading/thread_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698