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

Unified Diff: remoting/protocol/pairing_authenticator_base.h

Issue 1770923002: Remove dependency on V2Authenticator from ThirdParty and pairing authenticators. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: remoting/protocol/pairing_authenticator_base.h
diff --git a/remoting/protocol/pairing_authenticator_base.h b/remoting/protocol/pairing_authenticator_base.h
index e241f0ae8f7e2b785a9407e0c4312a2757acc2dc..14645c142776d56394041d8a3138a44fde090a7a 100644
--- a/remoting/protocol/pairing_authenticator_base.h
+++ b/remoting/protocol/pairing_authenticator_base.h
@@ -53,17 +53,14 @@ class PairingAuthenticatorBase : public Authenticator {
scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override;
protected:
- typedef base::Callback<void(scoped_ptr<Authenticator> authenticator)>
- SetAuthenticatorCallback;
-
static const buzz::StaticQName kPairingInfoTag;
static const buzz::StaticQName kClientIdAttribute;
- // Create a V2 authenticator in the specified state, prompting the user for
- // the PIN first if necessary.
- virtual void CreateV2AuthenticatorWithPIN(
+ // Create a Spake2 authenticator in the specified state, prompting the user
+ // for the PIN first if necessary.
+ virtual void CreateSpakeAuthenticatorWithPin(
State initial_state,
- const SetAuthenticatorCallback& callback) = 0;
+ const base::Closure& resume_callback) = 0;
// Amend an authenticator message, for example to add client- or host-specific
// elements to it.
@@ -75,27 +72,19 @@ class PairingAuthenticatorBase : public Authenticator {
// nor is it currently used other than being logged.
std::string error_message_;
- // The underlying V2 authenticator, created with either the PIN or the
+ // The underlying SPAKE2 authenticator, created with either the PIN or the
// Paired Secret by the derived class.
- scoped_ptr<Authenticator> v2_authenticator_;
+ scoped_ptr<Authenticator> spake2_authenticator_;
// Derived classes must set this to True if the underlying authenticator is
// using the Paired Secret.
- bool using_paired_secret_;
+ bool using_paired_secret_ = false;
private:
// Helper methods for ProcessMessage and GetNextMessage
void MaybeAddErrorMessage(buzz::XmlElement* message);
bool HasErrorMessage(const buzz::XmlElement* message) const;
void CheckForFailedSpakeExchange(const base::Closure& resume_callback);
- void SetAuthenticatorAndProcessMessage(
- const buzz::XmlElement* message,
- const base::Closure& resume_callback,
- scoped_ptr<Authenticator> authenticator);
-
- // Set to true if a PIN-based authenticator has been requested but has not
- // yet been set.
- bool waiting_for_authenticator_;
base::WeakPtrFactory<PairingAuthenticatorBase> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698