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

Unified Diff: remoting/protocol/authenticator.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/audio_writer.cc ('k') | remoting/protocol/authenticator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/authenticator.h
diff --git a/remoting/protocol/authenticator.h b/remoting/protocol/authenticator.h
index cc05dba1e5533c7ca812d698ad60f8d4ea14d903..8678dddc2c95e99ad2a1c24501024dfd2042d05c 100644
--- a/remoting/protocol/authenticator.h
+++ b/remoting/protocol/authenticator.h
@@ -5,10 +5,10 @@
#ifndef REMOTING_PROTOCOL_AUTHENTICATOR_H_
#define REMOTING_PROTOCOL_AUTHENTICATOR_H_
+#include <memory>
#include <string>
#include "base/callback_forward.h"
-#include "base/memory/scoped_ptr.h"
namespace buzz {
class XmlElement;
@@ -71,7 +71,7 @@ class Authenticator {
// Callback used for layered Authenticator implementations, particularly
// third-party and pairing authenticators. They use this callback to create
// base SPAKE2 authenticators.
- typedef base::Callback<scoped_ptr<Authenticator>(
+ typedef base::Callback<std::unique_ptr<Authenticator>(
const std::string& shared_secret,
Authenticator::State initial_state)>
CreateBaseAuthenticatorCallback;
@@ -80,7 +80,7 @@ class Authenticator {
static bool IsAuthenticatorMessage(const buzz::XmlElement* message);
// Creates an empty Authenticator message, owned by the caller.
- static scoped_ptr<buzz::XmlElement> CreateEmptyAuthenticatorMessage();
+ static std::unique_ptr<buzz::XmlElement> CreateEmptyAuthenticatorMessage();
// Finds Authenticator message among child elements of |message|, or
// returns nullptr otherwise.
@@ -111,15 +111,15 @@ class Authenticator {
// Must be called when in MESSAGE_READY state. Returns next
// authentication message that needs to be sent to the peer.
- virtual scoped_ptr<buzz::XmlElement> GetNextMessage() = 0;
+ virtual std::unique_ptr<buzz::XmlElement> GetNextMessage() = 0;
// Returns the auth key received as result of the authentication handshake.
virtual const std::string& GetAuthKey() const = 0;
// Creates new authenticator for a channel. Can be called only in
// the ACCEPTED state.
- virtual scoped_ptr<ChannelAuthenticator>
- CreateChannelAuthenticator() const = 0;
+ virtual std::unique_ptr<ChannelAuthenticator> CreateChannelAuthenticator()
+ const = 0;
};
// Factory for Authenticator instances.
@@ -136,7 +136,7 @@ class AuthenticatorFactory {
// if the |first_message| is invalid and the session should be
// rejected. ProcessMessage() should be called with |first_message|
// for the result of this method.
- virtual scoped_ptr<Authenticator> CreateAuthenticator(
+ virtual std::unique_ptr<Authenticator> CreateAuthenticator(
const std::string& local_jid,
const std::string& remote_jid) = 0;
};
« no previous file with comments | « remoting/protocol/audio_writer.cc ('k') | remoting/protocol/authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698