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

Unified Diff: remoting/protocol/pairing_client_authenticator.h

Issue 1781173005: Handle pairing_client_id in the negotiating authenticators. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@config
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
« no previous file with comments | « remoting/protocol/pairing_authenticator_base.cc ('k') | remoting/protocol/pairing_client_authenticator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pairing_client_authenticator.h
diff --git a/remoting/protocol/pairing_client_authenticator.h b/remoting/protocol/pairing_client_authenticator.h
index 1404e35ed87dc5c784107ebcc774c38b054e4c7e..fafd2d728df71a1fd1665b14f323abce4ebb4cb7 100644
--- a/remoting/protocol/pairing_client_authenticator.h
+++ b/remoting/protocol/pairing_client_authenticator.h
@@ -21,6 +21,16 @@ class PairingClientAuthenticator : public PairingAuthenticatorBase {
create_base_authenticator_callback);
~PairingClientAuthenticator() override;
+ // Start() or StartPaired() must be called after the authenticator is created.
+ // Start() handles both cases when pairing exists and when it doesn't.
+ // StartPaired() can only be used when pairing exists (i.e. client_id and
+ // pairing_secret are set in the |client_auth_config|). It is used to
+ // initialize the authenticator synchronously in
+ // NegotiatingClientAuthentitcator, while Start() may be executed
+ // asynchronously to fetch the PIN.
+ void Start(State initial_state, const base::Closure& resume_callback);
+ void StartPaired(State initial_state);
+
// Authenticator interface.
State state() const override;
@@ -29,7 +39,6 @@ class PairingClientAuthenticator : public PairingAuthenticatorBase {
void CreateSpakeAuthenticatorWithPin(
State initial_state,
const base::Closure& resume_callback) override;
- void AddPairingElements(buzz::XmlElement* message) override;
void OnPinFetched(State initial_state,
const base::Closure& resume_callback,
@@ -38,9 +47,6 @@ class PairingClientAuthenticator : public PairingAuthenticatorBase {
ClientAuthenticationConfig client_auth_config_;
CreateBaseAuthenticatorCallback create_base_authenticator_callback_;
- // Set to true after client_id is sent to the host.
- bool sent_client_id_ = false;
-
// Set to true if a PIN-based authenticator has been requested but has not
// yet been set.
bool waiting_for_pin_ = false;
« no previous file with comments | « remoting/protocol/pairing_authenticator_base.cc ('k') | remoting/protocol/pairing_client_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698