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

Side by Side Diff: remoting/protocol/authenticator_test_base.cc

Issue 86913002: Make base::Base64Encode() return void (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more chromeos-specific fix. Created 7 years 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/protocol/auth_util.cc ('k') | remoting/protocol/pairing_registry.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/protocol/authenticator_test_base.h" 5 #include "remoting/protocol/authenticator_test_base.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void AuthenticatorTestBase::SetUp() { 46 void AuthenticatorTestBase::SetUp() {
47 base::FilePath certs_dir(net::GetTestCertsDirectory()); 47 base::FilePath certs_dir(net::GetTestCertsDirectory());
48 48
49 base::FilePath cert_path = certs_dir.AppendASCII("unittest.selfsigned.der"); 49 base::FilePath cert_path = certs_dir.AppendASCII("unittest.selfsigned.der");
50 ASSERT_TRUE(base::ReadFileToString(cert_path, &host_cert_)); 50 ASSERT_TRUE(base::ReadFileToString(cert_path, &host_cert_));
51 51
52 base::FilePath key_path = certs_dir.AppendASCII("unittest.key.bin"); 52 base::FilePath key_path = certs_dir.AppendASCII("unittest.key.bin");
53 std::string key_string; 53 std::string key_string;
54 ASSERT_TRUE(base::ReadFileToString(key_path, &key_string)); 54 ASSERT_TRUE(base::ReadFileToString(key_path, &key_string));
55 std::string key_base64; 55 std::string key_base64;
56 ASSERT_TRUE(base::Base64Encode(key_string, &key_base64)); 56 base::Base64Encode(key_string, &key_base64);
57 key_pair_ = RsaKeyPair::FromString(key_base64); 57 key_pair_ = RsaKeyPair::FromString(key_base64);
58 ASSERT_TRUE(key_pair_.get()); 58 ASSERT_TRUE(key_pair_.get());
59 host_public_key_ = key_pair_->GetPublicKey(); 59 host_public_key_ = key_pair_->GetPublicKey();
60 } 60 }
61 61
62 void AuthenticatorTestBase::RunAuthExchange() { 62 void AuthenticatorTestBase::RunAuthExchange() {
63 ContinueAuthExchangeWith(client_.get(), host_.get()); 63 ContinueAuthExchangeWith(client_.get(), host_.get());
64 } 64 }
65 65
66 void AuthenticatorTestBase::RunHostInitiatedAuthExchange() { 66 void AuthenticatorTestBase::RunHostInitiatedAuthExchange() {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 void AuthenticatorTestBase::OnClientConnected( 144 void AuthenticatorTestBase::OnClientConnected(
145 net::Error error, 145 net::Error error,
146 scoped_ptr<net::StreamSocket> socket) { 146 scoped_ptr<net::StreamSocket> socket) {
147 client_callback_.OnDone(error); 147 client_callback_.OnDone(error);
148 client_socket_ = socket.Pass(); 148 client_socket_ = socket.Pass();
149 } 149 }
150 150
151 } // namespace protocol 151 } // namespace protocol
152 } // namespace remoting 152 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/auth_util.cc ('k') | remoting/protocol/pairing_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698