Index: base/task_scheduler/scheduler_worker_pool_impl.cc |
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.cc b/base/task_scheduler/scheduler_worker_pool_impl.cc |
index 8bea17661fa66a2791654e95673327842cd1b11c..22aa2c65db06e5eb476b31009542757a1b02e4d0 100644 |
--- a/base/task_scheduler/scheduler_worker_pool_impl.cc |
+++ b/base/task_scheduler/scheduler_worker_pool_impl.cc |
@@ -130,13 +130,12 @@ class SchedulerSequencedTaskRunner : public SequencedTaskRunner { |
}; |
// Only used in DCHECKs. |
-bool ContainsWorker( |
- const std::vector<std::unique_ptr<SchedulerWorker>>& workers, |
- const SchedulerWorker* worker) { |
+bool ContainsWorker(const std::vector<scoped_refptr<SchedulerWorker>>& workers, |
+ const SchedulerWorker* worker) { |
auto it = std::find_if(workers.begin(), workers.end(), |
- [worker](const std::unique_ptr<SchedulerWorker>& i) { |
- return i.get() == worker; |
- }); |
+ [worker](const scoped_refptr<SchedulerWorker>& i) { |
+ return i.get() == worker; |
+ }); |
return it != workers.end(); |
} |
@@ -697,7 +696,7 @@ bool SchedulerWorkerPoolImpl::Initialize( |
(index == 0 && !is_standby_lazy) |
? SchedulerWorker::InitialState::ALIVE |
: SchedulerWorker::InitialState::DETACHED; |
- std::unique_ptr<SchedulerWorker> worker = SchedulerWorker::Create( |
+ scoped_refptr<SchedulerWorker> worker = SchedulerWorker::Create( |
params.priority_hint(), |
MakeUnique<SchedulerWorkerDelegateImpl>( |
this, re_enqueue_sequence_callback, &shared_priority_queue_, index), |