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

Unified Diff: base/task_scheduler/priority_queue.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/task_scheduler/priority_queue.h ('k') | base/task_scheduler/priority_queue_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/priority_queue.cc
diff --git a/base/task_scheduler/priority_queue.cc b/base/task_scheduler/priority_queue.cc
index 8eb4b862642b3fc848140e36550425691398e90e..cea62a383f7b89baadeadca346b6c6f2ace4da98 100644
--- a/base/task_scheduler/priority_queue.cc
+++ b/base/task_scheduler/priority_queue.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
namespace base {
namespace internal {
@@ -40,7 +41,7 @@ PriorityQueue::Transaction::~Transaction() {
}
void PriorityQueue::Transaction::Push(
- scoped_ptr<SequenceAndSortKey> sequence_and_sort_key) {
+ std::unique_ptr<SequenceAndSortKey> sequence_and_sort_key) {
DCHECK(CalledOnValidThread());
DCHECK(!sequence_and_sort_key->is_null());
@@ -81,8 +82,8 @@ PriorityQueue::PriorityQueue(const Closure& sequence_inserted_callback,
PriorityQueue::~PriorityQueue() = default;
-scoped_ptr<PriorityQueue::Transaction> PriorityQueue::BeginTransaction() {
- return make_scoped_ptr(new Transaction(this));
+std::unique_ptr<PriorityQueue::Transaction> PriorityQueue::BeginTransaction() {
+ return WrapUnique(new Transaction(this));
}
} // namespace internal
« no previous file with comments | « base/task_scheduler/priority_queue.h ('k') | base/task_scheduler/priority_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698