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

Unified Diff: remoting/protocol/pairing_client_authenticator.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_client_authenticator.h
diff --git a/remoting/protocol/pairing_client_authenticator.h b/remoting/protocol/pairing_client_authenticator.h
index 50ff3e724b412a6ff4761556af877a4d2cf65d58..0e1a7093047ac250705d83ffd7575531fb22f91c 100644
--- a/remoting/protocol/pairing_client_authenticator.h
+++ b/remoting/protocol/pairing_client_authenticator.h
@@ -17,28 +17,37 @@ class PairingClientAuthenticator : public PairingAuthenticatorBase {
PairingClientAuthenticator(
const std::string& client_id,
const std::string& paired_secret,
+ const CreateBaseAuthenticatorCallback& create_base_authenticator_callback,
const FetchSecretCallback& fetch_pin_callback,
const std::string& authentication_tag);
~PairingClientAuthenticator() override;
+ // Authenticator interface.
+ State state() const override;
+
private:
- // PairingAuthenticatorBase interface.
- void CreateV2AuthenticatorWithPIN(
+ // PairingAuthenticatorBase overrides.
+ void CreateSpakeAuthenticatorWithPin(
State initial_state,
- const SetAuthenticatorCallback& callback) override;
+ const base::Closure& resume_callback) override;
void AddPairingElements(buzz::XmlElement* message) override;
void OnPinFetched(State initial_state,
- const SetAuthenticatorCallback& callback,
+ const base::Closure& resume_callback,
const std::string& pin);
// Protocol state.
- bool sent_client_id_;
+ bool sent_client_id_ = false;
std::string client_id_;
- const std::string& paired_secret_;
+ std::string paired_secret_;
+ CreateBaseAuthenticatorCallback create_base_authenticator_callback_;
FetchSecretCallback fetch_pin_callback_;
std::string authentication_tag_;
+ // Set to true if a PIN-based authenticator has been requested but has not
+ // yet been set.
+ bool waiting_for_pin_ = false;
+
base::WeakPtrFactory<PairingClientAuthenticator> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(PairingClientAuthenticator);

Powered by Google App Engine
This is Rietveld 408576698