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

Unified Diff: components/policy/core/common/remote_commands/remote_commands_service.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_service.h
diff --git a/components/policy/core/common/remote_commands/remote_commands_service.h b/components/policy/core/common/remote_commands/remote_commands_service.h
index 1e69d57ae14acadd53015600fe1d2e7d7aa3c176..1be70b18597514e1099a5f39b6e3f6045bfd6f67 100644
--- a/components/policy/core/common/remote_commands/remote_commands_service.h
+++ b/components/policy/core/common/remote_commands/remote_commands_service.h
@@ -6,10 +6,10 @@
#define COMPONENTS_POLICY_CORE_COMMON_REMOTE_COMMANDS_REMOTE_COMMANDS_SERVICE_H_
#include <deque>
+#include <memory>
#include <vector>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/remote_commands/remote_command_job.h"
@@ -32,7 +32,7 @@ class RemoteCommandsFactory;
class POLICY_EXPORT RemoteCommandsService
: public RemoteCommandsQueue::Observer {
public:
- RemoteCommandsService(scoped_ptr<RemoteCommandsFactory> factory,
+ RemoteCommandsService(std::unique_ptr<RemoteCommandsFactory> factory,
CloudPolicyClient* client);
~RemoteCommandsService() override;
@@ -51,7 +51,7 @@ class POLICY_EXPORT RemoteCommandsService
}
// Set an alternative clock for testing.
- void SetClockForTesting(scoped_ptr<base::TickClock> clock);
+ void SetClockForTesting(std::unique_ptr<base::TickClock> clock);
private:
// Helper function to enqueue a command which we get from server.
@@ -93,7 +93,7 @@ class POLICY_EXPORT RemoteCommandsService
std::deque<RemoteCommandJob::UniqueIDType> fetched_command_ids_;
RemoteCommandsQueue queue_;
- scoped_ptr<RemoteCommandsFactory> factory_;
+ std::unique_ptr<RemoteCommandsFactory> factory_;
CloudPolicyClient* const client_;
base::WeakPtrFactory<RemoteCommandsService> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698