Commit b6efea56 authored by Sungguk Lim's avatar Sungguk Lim Committed by Commit Bot

Remove linked_ptr from components/policy/*

Use std::unique_ptr instead of deprecated linked_ptr

Bug: 556939
Change-Id: Iefb3dcb3ae891fe4b0fd0dd70be408517bcd9d85
Reviewed-on: https://chromium-review.googlesource.com/1034942Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Commit-Queue: Sungguk Lim <limasdf@gmail.com>
Cr-Commit-Position: refs/heads/master@{#555303}
parent 82812cf3
...@@ -35,7 +35,7 @@ void RemoteCommandsQueue::RemoveObserver(Observer* observer) { ...@@ -35,7 +35,7 @@ void RemoteCommandsQueue::RemoveObserver(Observer* observer) {
} }
void RemoteCommandsQueue::AddJob(std::unique_ptr<RemoteCommandJob> job) { void RemoteCommandsQueue::AddJob(std::unique_ptr<RemoteCommandJob> job) {
incoming_commands_.push(linked_ptr<RemoteCommandJob>(job.release())); incoming_commands_.emplace(std::move(job));
if (!running_command_) if (!running_command_)
ScheduleNextJob(); ScheduleNextJob();
...@@ -74,7 +74,7 @@ void RemoteCommandsQueue::ScheduleNextJob() { ...@@ -74,7 +74,7 @@ void RemoteCommandsQueue::ScheduleNextJob() {
return; return;
DCHECK(!execution_timeout_timer_.IsRunning()); DCHECK(!execution_timeout_timer_.IsRunning());
running_command_.reset(incoming_commands_.front().release()); running_command_ = std::move(incoming_commands_.front());
incoming_commands_.pop(); incoming_commands_.pop();
execution_timeout_timer_.Start(FROM_HERE, execution_timeout_timer_.Start(FROM_HERE,
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/containers/queue.h" #include "base/containers/queue.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "components/policy/policy_export.h" #include "components/policy/policy_export.h"
...@@ -72,7 +71,7 @@ class POLICY_EXPORT RemoteCommandsQueue { ...@@ -72,7 +71,7 @@ class POLICY_EXPORT RemoteCommandsQueue {
// Attempts to start a new command. // Attempts to start a new command.
void ScheduleNextJob(); void ScheduleNextJob();
base::queue<linked_ptr<RemoteCommandJob>> incoming_commands_; base::queue<std::unique_ptr<RemoteCommandJob>> incoming_commands_;
std::unique_ptr<RemoteCommandJob> running_command_; std::unique_ptr<RemoteCommandJob> running_command_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment