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

Side by Side Diff: remoting/test/protocol_perftest.cc

Issue 1788943002: Revert of 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <utility> 5 #include <utility>
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 GetParam().bandwidth, GetParam().max_buffers); 381 GetParam().bandwidth, GetParam().max_buffers);
382 port_allocator_factory->socket_factory()->SetLatency( 382 port_allocator_factory->socket_factory()->SetLatency(
383 GetParam().latency_average, GetParam().latency_stddev); 383 GetParam().latency_average, GetParam().latency_stddev);
384 port_allocator_factory->socket_factory()->set_out_of_order_rate( 384 port_allocator_factory->socket_factory()->set_out_of_order_rate(
385 GetParam().out_of_order_rate); 385 GetParam().out_of_order_rate);
386 scoped_refptr<protocol::TransportContext> transport_context( 386 scoped_refptr<protocol::TransportContext> transport_context(
387 new protocol::TransportContext( 387 new protocol::TransportContext(
388 host_signaling_.get(), std::move(port_allocator_factory), nullptr, 388 host_signaling_.get(), std::move(port_allocator_factory), nullptr,
389 network_settings, protocol::TransportRole::CLIENT)); 389 network_settings, protocol::TransportRole::CLIENT));
390 390
391 protocol::ClientAuthenticationConfig client_auth_config; 391 scoped_ptr<protocol::Authenticator> client_authenticator(
392 client_auth_config.host_id = kHostId; 392 new protocol::NegotiatingClientAuthenticator(
393 client_auth_config.fetch_secret_callback = 393 std::string(), // client_pairing_id
394 base::Bind(&ProtocolPerfTest::FetchPin, base::Unretained(this)); 394 std::string(), // client_pairing_secret
395 395 kHostId,
396 base::Bind(&ProtocolPerfTest::FetchPin, base::Unretained(this)),
397 protocol::FetchThirdPartyTokenCallback()));
396 client_.reset( 398 client_.reset(
397 new ChromotingClient(client_context_.get(), this, this, nullptr)); 399 new ChromotingClient(client_context_.get(), this, this, nullptr));
398 client_->set_protocol_config(protocol_config_->Clone()); 400 client_->set_protocol_config(protocol_config_->Clone());
399 client_->Start(client_signaling_.get(), client_auth_config, 401 client_->Start(client_signaling_.get(), std::move(client_authenticator),
400 transport_context, kHostJid, std::string()); 402 transport_context, kHostJid, std::string());
401 } 403 }
402 404
403 void FetchPin( 405 void FetchPin(
404 bool pairing_supported, 406 bool pairing_supported,
405 const protocol::SecretFetchedCallback& secret_fetched_callback) { 407 const protocol::SecretFetchedCallback& secret_fetched_callback) {
406 secret_fetched_callback.Run(kHostPin); 408 secret_fetched_callback.Run(kHostPin);
407 } 409 }
408 410
409 void MeasureTotalLatency(bool webrtc) { 411 void MeasureTotalLatency(bool webrtc) {
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 629
628 TEST_P(ProtocolPerfTest, TotalLatencyIce) { 630 TEST_P(ProtocolPerfTest, TotalLatencyIce) {
629 MeasureTotalLatency(false); 631 MeasureTotalLatency(false);
630 } 632 }
631 633
632 TEST_P(ProtocolPerfTest, TotalLatencyWebrtc) { 634 TEST_P(ProtocolPerfTest, TotalLatencyWebrtc) {
633 MeasureTotalLatency(true); 635 MeasureTotalLatency(true);
634 } 636 }
635 637
636 } // namespace remoting 638 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/negotiating_client_authenticator.cc ('k') | remoting/test/test_chromoting_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698