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

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

Issue 1643793002: Add policy to restrict client domain for Me2Me. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remoting_perftests compile. Created 4 years, 10 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
« no previous file with comments | « remoting/remoting_srcs.gypi ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « remoting/remoting_srcs.gypi ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698