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

Unified Diff: base/task_scheduler/sequence.h

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/scheduler_worker_thread_unittest.cc ('k') | base/task_scheduler/sequence.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/sequence.h
diff --git a/base/task_scheduler/sequence.h b/base/task_scheduler/sequence.h
index e86cf5916494111693cb292f10b73510d72486b6..b77576b4aaeea21f23e8ce646a365722c5c43e65 100644
--- a/base/task_scheduler/sequence.h
+++ b/base/task_scheduler/sequence.h
@@ -7,12 +7,12 @@
#include <stddef.h>
+#include <memory>
#include <queue>
#include "base/base_export.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/task_scheduler/scheduler_lock.h"
#include "base/task_scheduler/sequence_sort_key.h"
#include "base/task_scheduler/task.h"
@@ -29,7 +29,7 @@ class BASE_EXPORT Sequence : public RefCountedThreadSafe<Sequence> {
// Adds |task| at the end of the sequence's queue. Returns true if the
// sequence was empty before this operation.
- bool PushTask(scoped_ptr<Task> task);
+ bool PushTask(std::unique_ptr<Task> task);
// Returns the task in front of the sequence's queue, if any.
const Task* PeekTask() const;
@@ -51,7 +51,7 @@ class BASE_EXPORT Sequence : public RefCountedThreadSafe<Sequence> {
mutable SchedulerLock lock_;
// Queue of tasks to execute.
- std::queue<scoped_ptr<Task>> queue_;
+ std::queue<std::unique_ptr<Task>> queue_;
// Number of tasks contained in the sequence for each priority.
size_t num_tasks_per_priority_[static_cast<int>(TaskPriority::HIGHEST) + 1] =
« no previous file with comments | « base/task_scheduler/scheduler_worker_thread_unittest.cc ('k') | base/task_scheduler/sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698