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

Unified Diff: remoting/protocol/negotiating_client_authenticator.cc

Issue 15685008: Show a 'remember me' checkbox in the web-app when connecting to a host that supports pairing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 7 years, 7 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/negotiating_client_authenticator.cc
diff --git a/remoting/protocol/negotiating_client_authenticator.cc b/remoting/protocol/negotiating_client_authenticator.cc
index c6a2a7b6be5fdd3a572634a4c80d97cc85f951a9..599fca861833eb733f3013b866b8b20d40bcf827 100644
--- a/remoting/protocol/negotiating_client_authenticator.cc
+++ b/remoting/protocol/negotiating_client_authenticator.cc
@@ -125,12 +125,12 @@ void NegotiatingClientAuthenticator::CreateAuthenticatorForCurrentMethod(
} else {
DCHECK(current_method_.type() == AuthenticationMethod::SPAKE2 ||
current_method_.type() == AuthenticationMethod::SPAKE2_PAIR);
- // TODO(jamiewalch): Add a bool parameter to the fetch secret callback to
- // indicate whether or not to show the "remember me" checkbox. Set it to
- // (current_method_.type() == AuthenticationMethod::SPAKE2_PAIR).
- fetch_secret_callback_.Run(base::Bind(
+ bool pairing_supported =
+ (current_method_.type() == AuthenticationMethod::SPAKE2_PAIR);
+ SecretFetchedCallback callback = base::Bind(
&NegotiatingClientAuthenticator::CreateV2AuthenticatorWithSecret,
- weak_factory_.GetWeakPtr(), preferred_initial_state, resume_callback));
+ weak_factory_.GetWeakPtr(), preferred_initial_state, resume_callback);
+ fetch_secret_callback_.Run(pairing_supported, callback);
}
}
« no previous file with comments | « remoting/protocol/negotiating_authenticator_unittest.cc ('k') | remoting/protocol/pairing_client_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698