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

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

Issue 2682473003: Add support for multiple allowed domains (Closed)
Patch Set: Rework to follow a deprecation approach Created 3 years, 8 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 <numeric> 5 #include <numeric>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 ASSERT_TRUE(base::ReadFileToString(key_path, &key_string)); 304 ASSERT_TRUE(base::ReadFileToString(key_path, &key_string));
305 std::string key_base64; 305 std::string key_base64;
306 base::Base64Encode(key_string, &key_base64); 306 base::Base64Encode(key_string, &key_base64);
307 scoped_refptr<RsaKeyPair> key_pair = RsaKeyPair::FromString(key_base64); 307 scoped_refptr<RsaKeyPair> key_pair = RsaKeyPair::FromString(key_base64);
308 ASSERT_TRUE(key_pair.get()); 308 ASSERT_TRUE(key_pair.get());
309 309
310 std::string host_pin_hash = 310 std::string host_pin_hash =
311 protocol::GetSharedSecretHash(kHostId, kHostPin); 311 protocol::GetSharedSecretHash(kHostId, kHostPin);
312 std::unique_ptr<protocol::AuthenticatorFactory> auth_factory = 312 std::unique_ptr<protocol::AuthenticatorFactory> auth_factory =
313 protocol::Me2MeHostAuthenticatorFactory::CreateWithPin( 313 protocol::Me2MeHostAuthenticatorFactory::CreateWithPin(
314 true, kHostOwner, host_cert, key_pair, "", host_pin_hash, nullptr); 314 true, kHostOwner, host_cert, key_pair, std::vector<std::string>(),
315 host_pin_hash, nullptr);
315 host_->SetAuthenticatorFactory(std::move(auth_factory)); 316 host_->SetAuthenticatorFactory(std::move(auth_factory));
316 317
317 host_->AddStatusObserver(this); 318 host_->AddStatusObserver(this);
318 host_->Start(kHostOwner); 319 host_->Start(kHostOwner);
319 320
320 message_loop_.task_runner()->PostTask( 321 message_loop_.task_runner()->PostTask(
321 FROM_HERE, base::Bind(&ProtocolPerfTest::StartClientAfterHost, 322 FROM_HERE, base::Bind(&ProtocolPerfTest::StartClientAfterHost,
322 base::Unretained(this))); 323 base::Unretained(this)));
323 } 324 }
324 325
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 638
638 TEST_P(ProtocolPerfTest, ScrollPerformanceIce) { 639 TEST_P(ProtocolPerfTest, ScrollPerformanceIce) {
639 MeasureScrollPerformance(false); 640 MeasureScrollPerformance(false);
640 } 641 }
641 642
642 TEST_P(ProtocolPerfTest, ScrollPerformanceWebrtc) { 643 TEST_P(ProtocolPerfTest, ScrollPerformanceWebrtc) {
643 MeasureScrollPerformance(true); 644 MeasureScrollPerformance(true);
644 } 645 }
645 646
646 } // namespace remoting 647 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698