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

Unified Diff: components/policy/core/common/remote_commands/remote_commands_queue.h

Issue 1902633006: Convert //components/policy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use namespace alias 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
Index: components/policy/core/common/remote_commands/remote_commands_queue.h
diff --git a/components/policy/core/common/remote_commands/remote_commands_queue.h b/components/policy/core/common/remote_commands/remote_commands_queue.h
index a919a21bff5358580bedb60d8b012bdffc3624ec..955d6a233258e6977be5a892fa4de27c6b39e8b7 100644
--- a/components/policy/core/common/remote_commands/remote_commands_queue.h
+++ b/components/policy/core/common/remote_commands/remote_commands_queue.h
@@ -5,11 +5,11 @@
#ifndef COMPONENTS_POLICY_CORE_COMMON_REMOTE_COMMANDS_REMOTE_COMMANDS_QUEUE_H_
#define COMPONENTS_POLICY_CORE_COMMON_REMOTE_COMMANDS_REMOTE_COMMANDS_QUEUE_H_
+#include <memory>
#include <queue>
#include "base/macros.h"
#include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/timer/timer.h"
#include "components/policy/policy_export.h"
@@ -52,10 +52,10 @@ class POLICY_EXPORT RemoteCommandsQueue {
void RemoveObserver(Observer* observer);
// Add a |job| to the queue.
- void AddJob(scoped_ptr<RemoteCommandJob> job);
+ void AddJob(std::unique_ptr<RemoteCommandJob> job);
// Set an alternative clock for testing.
- void SetClockForTesting(scoped_ptr<base::TickClock> clock);
+ void SetClockForTesting(std::unique_ptr<base::TickClock> clock);
// Helper function to get the current time.
base::TimeTicks GetNowTicks();
@@ -74,9 +74,9 @@ class POLICY_EXPORT RemoteCommandsQueue {
std::queue<linked_ptr<RemoteCommandJob>> incoming_commands_;
- scoped_ptr<RemoteCommandJob> running_command_;
+ std::unique_ptr<RemoteCommandJob> running_command_;
- scoped_ptr<base::TickClock> clock_;
+ std::unique_ptr<base::TickClock> clock_;
base::OneShotTimer execution_timeout_timer_;
base::ObserverList<Observer, true> observer_list_;

Powered by Google App Engine
This is Rietveld 408576698