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

Unified Diff: base/task_scheduler/task_tracker.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/sequence_unittest.cc ('k') | base/task_scheduler/task_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_tracker.h
diff --git a/base/task_scheduler/task_tracker.h b/base/task_scheduler/task_tracker.h
index 5b9fd14124f9b4c461ef4eee2b052af9ef5b5fef..811bd9a136c3c47064c483a82dc04933ab56d569 100644
--- a/base/task_scheduler/task_tracker.h
+++ b/base/task_scheduler/task_tracker.h
@@ -5,10 +5,11 @@
#ifndef BASE_TASK_SCHEDULER_TASK_TRACKER_H_
#define BASE_TASK_SCHEDULER_TASK_TRACKER_H_
+#include <memory>
+
#include "base/base_export.h"
#include "base/callback_forward.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram_base.h"
#include "base/synchronization/condition_variable.h"
#include "base/task_scheduler/scheduler_lock.h"
@@ -37,8 +38,8 @@ class BASE_EXPORT TaskTracker {
// Posts |task| by calling |post_task_callback| unless the current shutdown
// state prevents that. A task forwarded to |post_task_callback| must be
// handed back to this instance's RunTask() when it is to be executed.
- void PostTask(const Callback<void(scoped_ptr<Task>)>& post_task_callback,
- scoped_ptr<Task> task);
+ void PostTask(const Callback<void(std::unique_ptr<Task>)>& post_task_callback,
+ std::unique_ptr<Task> task);
// Runs |task| unless the current shutdown state prevents that. |task| must
// have been successfully posted via PostTask() first.
@@ -75,7 +76,7 @@ class BASE_EXPORT TaskTracker {
// Condition variable signaled when |num_tasks_blocking_shutdown_| reaches
// zero while shutdown is in progress. Null if shutdown isn't in progress.
- scoped_ptr<ConditionVariable> shutdown_cv_;
+ std::unique_ptr<ConditionVariable> shutdown_cv_;
// Number of tasks blocking shutdown.
size_t num_tasks_blocking_shutdown_ = 0;
« no previous file with comments | « base/task_scheduler/sequence_unittest.cc ('k') | base/task_scheduler/task_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698