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

Unified Diff: remoting/protocol/pairing_registry.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 | « remoting/protocol/pairing_authenticator_base.cc ('k') | remoting/protocol/pairing_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pairing_registry.h
diff --git a/remoting/protocol/pairing_registry.h b/remoting/protocol/pairing_registry.h
index b34404e1ad86a366523e8c246b6e6ab65cc704ae..b9b2e5e262901019f922f94afba2f4fd6f274cf7 100644
--- a/remoting/protocol/pairing_registry.h
+++ b/remoting/protocol/pairing_registry.h
@@ -6,6 +6,7 @@
#define REMOTING_PROTOCOL_PAIRING_REGISTRY_H_
#include <map>
+#include <memory>
#include <queue>
#include <string>
#include <vector>
@@ -14,7 +15,6 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
namespace base {
@@ -53,7 +53,7 @@ class PairingRegistry : public base::RefCountedThreadSafe<PairingRegistry> {
static Pairing Create(const std::string& client_name);
static Pairing CreateFromValue(const base::DictionaryValue& pairing);
- scoped_ptr<base::DictionaryValue> ToValue() const;
+ std::unique_ptr<base::DictionaryValue> ToValue() const;
bool operator==(const Pairing& other) const;
@@ -76,7 +76,7 @@ class PairingRegistry : public base::RefCountedThreadSafe<PairingRegistry> {
// Delegate callbacks.
typedef base::Callback<void(bool success)> DoneCallback;
- typedef base::Callback<void(scoped_ptr<base::ListValue> pairings)>
+ typedef base::Callback<void(std::unique_ptr<base::ListValue> pairings)>
GetAllPairingsCallback;
typedef base::Callback<void(Pairing pairing)> GetPairingCallback;
@@ -91,7 +91,7 @@ class PairingRegistry : public base::RefCountedThreadSafe<PairingRegistry> {
virtual ~Delegate() {}
// Retrieves all JSON-encoded pairings from persistent storage.
- virtual scoped_ptr<base::ListValue> LoadAll() = 0;
+ virtual std::unique_ptr<base::ListValue> LoadAll() = 0;
// Deletes all pairings in persistent storage.
virtual bool DeleteAll() = 0;
@@ -108,7 +108,7 @@ class PairingRegistry : public base::RefCountedThreadSafe<PairingRegistry> {
PairingRegistry(
scoped_refptr<base::SingleThreadTaskRunner> delegate_task_runner,
- scoped_ptr<Delegate> delegate);
+ std::unique_ptr<Delegate> delegate);
// Creates a pairing for a new client and saves it to disk.
//
@@ -175,11 +175,11 @@ class PairingRegistry : public base::RefCountedThreadSafe<PairingRegistry> {
const GetPairingCallback& callback, Pairing pairing);
void InvokeGetAllPairingsCallbackAndScheduleNext(
const GetAllPairingsCallback& callback,
- scoped_ptr<base::ListValue> pairings);
+ std::unique_ptr<base::ListValue> pairings);
// Sanitize |pairings| by parsing each entry and removing the secret from it.
void SanitizePairings(const GetAllPairingsCallback& callback,
- scoped_ptr<base::ListValue> pairings);
+ std::unique_ptr<base::ListValue> pairings);
// Queue management methods.
void ServiceOrQueueRequest(const base::Closure& request);
@@ -193,7 +193,7 @@ class PairingRegistry : public base::RefCountedThreadSafe<PairingRegistry> {
// called at a time.
scoped_refptr<base::SingleThreadTaskRunner> delegate_task_runner_;
- scoped_ptr<Delegate> delegate_;
+ std::unique_ptr<Delegate> delegate_;
std::queue<base::Closure> pending_requests_;
« no previous file with comments | « remoting/protocol/pairing_authenticator_base.cc ('k') | remoting/protocol/pairing_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698