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

Unified Diff: base/threading/platform_thread_posix.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/non_thread_safe_unittest.cc ('k') | base/threading/sequenced_task_runner_handle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread_posix.cc
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
index bd6ae2dc09913b6396469455f16891dba90948a8..d8bcf923a2bde1b50847271313e47f367c6955dc 100644
--- a/base/threading/platform_thread_posix.cc
+++ b/base/threading/platform_thread_posix.cc
@@ -12,9 +12,10 @@
#include <sys/resource.h>
#include <sys/time.h>
+#include <memory>
+
#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/threading/platform_thread_internal_posix.h"
#include "base/threading/thread_id_name_manager.h"
#include "base/threading/thread_restrictions.h"
@@ -47,7 +48,8 @@ void* ThreadFunc(void* params) {
PlatformThread::Delegate* delegate = nullptr;
{
- scoped_ptr<ThreadParams> thread_params(static_cast<ThreadParams*>(params));
+ std::unique_ptr<ThreadParams> thread_params(
+ static_cast<ThreadParams*>(params));
delegate = thread_params->delegate;
if (!thread_params->joinable)
@@ -98,7 +100,7 @@ bool CreateThread(size_t stack_size,
if (stack_size > 0)
pthread_attr_setstacksize(&attributes, stack_size);
- scoped_ptr<ThreadParams> params(new ThreadParams);
+ std::unique_ptr<ThreadParams> params(new ThreadParams);
params->delegate = delegate;
params->joinable = joinable;
params->priority = priority;
« no previous file with comments | « base/threading/non_thread_safe_unittest.cc ('k') | base/threading/sequenced_task_runner_handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698