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

Unified Diff: components/proximity_auth/connection.h

Issue 1912433002: Convert //components/proximity_auth from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/proximity_auth/connection.h
diff --git a/components/proximity_auth/connection.h b/components/proximity_auth/connection.h
index 532e03d93769592d6e38ea56cf8b492feaa7ffce..a222e425e01566ff786d785f4ca0d39d6124984b 100644
--- a/components/proximity_auth/connection.h
+++ b/components/proximity_auth/connection.h
@@ -5,9 +5,10 @@
#ifndef COMPONENTS_PROXIMITY_AUTH_CONNECTION_H
#define COMPONENTS_PROXIMITY_AUTH_CONNECTION_H
+#include <memory>
+
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "components/proximity_auth/remote_device.h"
@@ -39,7 +40,7 @@ class Connection {
// Sends a message to the remote device.
// |OnSendCompleted()| will be called for all observers upon completion with
// either success or failure.
- void SendMessage(scoped_ptr<WireMessage> message);
+ void SendMessage(std::unique_ptr<WireMessage> message);
void AddObserver(ConnectionObserver* observer);
void RemoveObserver(ConnectionObserver* observer);
@@ -79,14 +80,14 @@ class Connection {
// OnDidSendMessage() once the send succeeds or fails. At most one send will
// be
// in progress.
- virtual void SendMessageImpl(scoped_ptr<WireMessage> message) = 0;
+ virtual void SendMessageImpl(std::unique_ptr<WireMessage> message) = 0;
// Deserializes the |recieved_bytes_| and returns the resulting WireMessage,
// or NULL if the message is malformed. Sets |is_incomplete_message| to true
// if the |serialized_message| does not have enough data to parse the header,
// or if the message length encoded in the message header exceeds the size of
// the |serialized_message|. Exposed for testing.
- virtual scoped_ptr<WireMessage> DeserializeWireMessage(
+ virtual std::unique_ptr<WireMessage> DeserializeWireMessage(
bool* is_incomplete_message);
private:

Powered by Google App Engine
This is Rietveld 408576698