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

Unified Diff: remoting/test/test_chromoting_client.cc

Issue 1778023002: Move NegotiatingClientAuthentication creation to ChromotingClient. (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
« no previous file with comments | « remoting/test/protocol_perftest.cc ('k') | remoting/webapp/base/js/client_plugin_impl.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/test_chromoting_client.cc
diff --git a/remoting/test/test_chromoting_client.cc b/remoting/test/test_chromoting_client.cc
index 917980ca1147fa101627ed48b1cf26d82660794c..9bc33cae324b24ad8746cb957f6a2aaf680ca55d 100644
--- a/remoting/test/test_chromoting_client.cc
+++ b/remoting/test/test_chromoting_client.cc
@@ -126,25 +126,23 @@ void TestChromotingClient::StartConnection(
new ChromiumUrlRequestFactory(request_context_getter)),
network_settings, protocol::TransportRole::CLIENT));
- protocol::FetchSecretCallback fetch_secret_callback;
+ protocol::ClientAuthenticationConfig client_auth_config;
+ client_auth_config.host_id = connection_setup_info.host_id;
+ client_auth_config.pairing_client_id = connection_setup_info.pairing_id;
+ client_auth_config.pairing_secret = connection_setup_info.shared_secret;
+
if (!connection_setup_info.pin.empty()) {
- fetch_secret_callback = base::Bind(&FetchSecret, connection_setup_info.pin);
+ client_auth_config.fetch_secret_callback =
+ base::Bind(&FetchSecret, connection_setup_info.pin);
}
- protocol::FetchThirdPartyTokenCallback fetch_third_party_token_callback =
- base::Bind(&FetchThirdPartyToken,
- connection_setup_info.authorization_code,
- connection_setup_info.shared_secret);
-
- scoped_ptr<protocol::Authenticator> authenticator(
- new protocol::NegotiatingClientAuthenticator(
- connection_setup_info.pairing_id, connection_setup_info.shared_secret,
- connection_setup_info.host_id, fetch_secret_callback,
- fetch_third_party_token_callback));
+ client_auth_config.fetch_third_party_token_callback = base::Bind(
+ &FetchThirdPartyToken, connection_setup_info.authorization_code,
+ connection_setup_info.shared_secret);
- chromoting_client_->Start(
- signal_strategy_.get(), std::move(authenticator), transport_context,
- connection_setup_info.host_jid, connection_setup_info.capabilities);
+ chromoting_client_->Start(signal_strategy_.get(), client_auth_config,
+ transport_context, connection_setup_info.host_jid,
+ connection_setup_info.capabilities);
}
void TestChromotingClient::EndConnection() {
« no previous file with comments | « remoting/test/protocol_perftest.cc ('k') | remoting/webapp/base/js/client_plugin_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698