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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 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
« no previous file with comments | « remoting/protocol/authenticator.cc ('k') | remoting/protocol/authenticator_test_base.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 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ 5 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_
6 #define REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ 6 #define REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace remoting { 17 namespace remoting {
18 18
19 class RsaKeyPair; 19 class RsaKeyPair;
20 20
21 namespace protocol { 21 namespace protocol {
22 22
(...skipping 17 matching lines...) Expand all
40 40
41 static void ContinueAuthExchangeWith(Authenticator* sender, 41 static void ContinueAuthExchangeWith(Authenticator* sender,
42 Authenticator* receiver, 42 Authenticator* receiver,
43 bool sender_started, 43 bool sender_started,
44 bool receiver_srated); 44 bool receiver_srated);
45 void SetUp() override; 45 void SetUp() override;
46 void RunAuthExchange(); 46 void RunAuthExchange();
47 void RunHostInitiatedAuthExchange(); 47 void RunHostInitiatedAuthExchange();
48 void RunChannelAuth(bool expected_fail); 48 void RunChannelAuth(bool expected_fail);
49 49
50 void OnHostConnected(int error, 50 void OnHostConnected(int error, std::unique_ptr<P2PStreamSocket> socket);
51 scoped_ptr<P2PStreamSocket> socket); 51 void OnClientConnected(int error, std::unique_ptr<P2PStreamSocket> socket);
52 void OnClientConnected(int error,
53 scoped_ptr<P2PStreamSocket> socket);
54 52
55 base::MessageLoop message_loop_; 53 base::MessageLoop message_loop_;
56 54
57 scoped_refptr<RsaKeyPair> key_pair_; 55 scoped_refptr<RsaKeyPair> key_pair_;
58 std::string host_public_key_; 56 std::string host_public_key_;
59 std::string host_cert_; 57 std::string host_cert_;
60 scoped_ptr<Authenticator> host_; 58 std::unique_ptr<Authenticator> host_;
61 scoped_ptr<Authenticator> client_; 59 std::unique_ptr<Authenticator> client_;
62 scoped_ptr<FakeStreamSocket> client_fake_socket_; 60 std::unique_ptr<FakeStreamSocket> client_fake_socket_;
63 scoped_ptr<FakeStreamSocket> host_fake_socket_; 61 std::unique_ptr<FakeStreamSocket> host_fake_socket_;
64 scoped_ptr<ChannelAuthenticator> client_auth_; 62 std::unique_ptr<ChannelAuthenticator> client_auth_;
65 scoped_ptr<ChannelAuthenticator> host_auth_; 63 std::unique_ptr<ChannelAuthenticator> host_auth_;
66 MockChannelDoneCallback client_callback_; 64 MockChannelDoneCallback client_callback_;
67 MockChannelDoneCallback host_callback_; 65 MockChannelDoneCallback host_callback_;
68 scoped_ptr<P2PStreamSocket> client_socket_; 66 std::unique_ptr<P2PStreamSocket> client_socket_;
69 scoped_ptr<P2PStreamSocket> host_socket_; 67 std::unique_ptr<P2PStreamSocket> host_socket_;
70 68
71 DISALLOW_COPY_AND_ASSIGN(AuthenticatorTestBase); 69 DISALLOW_COPY_AND_ASSIGN(AuthenticatorTestBase);
72 }; 70 };
73 71
74 } // namespace protocol 72 } // namespace protocol
75 } // namespace remoting 73 } // namespace remoting
76 74
77 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_ 75 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_TEST_BASE_H_
OLDNEW
« no previous file with comments | « remoting/protocol/authenticator.cc ('k') | remoting/protocol/authenticator_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698