| OLD | NEW |
| 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 std::string key_base64; | 346 std::string key_base64; |
| 347 base::Base64Encode(key_string, &key_base64); | 347 base::Base64Encode(key_string, &key_base64); |
| 348 scoped_refptr<RsaKeyPair> key_pair = RsaKeyPair::FromString(key_base64); | 348 scoped_refptr<RsaKeyPair> key_pair = RsaKeyPair::FromString(key_base64); |
| 349 ASSERT_TRUE(key_pair.get()); | 349 ASSERT_TRUE(key_pair.get()); |
| 350 | 350 |
| 351 protocol::SharedSecretHash host_secret; | 351 protocol::SharedSecretHash host_secret; |
| 352 host_secret.hash_function = protocol::AuthenticationMethod::NONE; | 352 host_secret.hash_function = protocol::AuthenticationMethod::NONE; |
| 353 host_secret.value = "123456"; | 353 host_secret.value = "123456"; |
| 354 scoped_ptr<protocol::AuthenticatorFactory> auth_factory = | 354 scoped_ptr<protocol::AuthenticatorFactory> auth_factory = |
| 355 protocol::Me2MeHostAuthenticatorFactory::CreateWithSharedSecret( | 355 protocol::Me2MeHostAuthenticatorFactory::CreateWithSharedSecret( |
| 356 true, kHostOwner, host_cert, key_pair, host_secret, nullptr); | 356 true, kHostOwner, host_cert, key_pair, "", host_secret, nullptr); |
| 357 host_->SetAuthenticatorFactory(std::move(auth_factory)); | 357 host_->SetAuthenticatorFactory(std::move(auth_factory)); |
| 358 | 358 |
| 359 host_->AddStatusObserver(this); | 359 host_->AddStatusObserver(this); |
| 360 host_->Start(kHostOwner); | 360 host_->Start(kHostOwner); |
| 361 | 361 |
| 362 message_loop_.PostTask(FROM_HERE, | 362 message_loop_.PostTask(FROM_HERE, |
| 363 base::Bind(&ProtocolPerfTest::StartClientAfterHost, | 363 base::Bind(&ProtocolPerfTest::StartClientAfterHost, |
| 364 base::Unretained(this))); | 364 base::Unretained(this))); |
| 365 } | 365 } |
| 366 | 366 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 | 631 |
| 632 TEST_P(ProtocolPerfTest, TotalLatencyIce) { | 632 TEST_P(ProtocolPerfTest, TotalLatencyIce) { |
| 633 MeasureTotalLatency(false); | 633 MeasureTotalLatency(false); |
| 634 } | 634 } |
| 635 | 635 |
| 636 TEST_P(ProtocolPerfTest, TotalLatencyWebrtc) { | 636 TEST_P(ProtocolPerfTest, TotalLatencyWebrtc) { |
| 637 MeasureTotalLatency(true); | 637 MeasureTotalLatency(true); |
| 638 } | 638 } |
| 639 | 639 |
| 640 } // namespace remoting | 640 } // namespace remoting |
| OLD | NEW |