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

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

Issue 8743023: Separate Authenticator and Session unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_V1_HOST_CHANNEL_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_V1_HOST_CHANNEL_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_V1_HOST_CHANNEL_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_V1_HOST_CHANNEL_AUTHENTICATOR_H_
7 7
8 #include "remoting/protocol/channel_authenticator.h" 8 #include "remoting/protocol/channel_authenticator.h"
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/threading/non_thread_safe.h" 11 #include "base/threading/non_thread_safe.h"
12 #include "net/base/completion_callback.h" 12 #include "net/base/completion_callback.h"
13 13
14 namespace crypto { 14 namespace crypto {
15 class RSAPrivateKey; 15 class RSAPrivateKey;
16 } // namespace crypto 16 } // namespace crypto
17 17
18 namespace net { 18 namespace net {
19 class GrowableIOBuffer; 19 class GrowableIOBuffer;
20 class SSLServerSocket; 20 class SSLServerSocket;
21 class SSLSocket; 21 class SSLSocket;
22 } // namespace net 22 } // namespace net
23 23
24 namespace remoting { 24 namespace remoting {
25 namespace protocol { 25 namespace protocol {
26 26
27 class V1HostChannelAuthenticator : public ChannelAuthenticator, 27 class V1HostChannelAuthenticator : public ChannelAuthenticator,
28 public base::NonThreadSafe { 28 public base::NonThreadSafe {
29 public: 29 public:
30 // Caller retains ownership of |local_private_key|. It must exist 30 // Caller retains ownership of |local_private_key|. It must exist
31 // while this object exists. 31 // while this object exists.
32 V1HostChannelAuthenticator(const std::string& local_cert, 32 V1HostChannelAuthenticator(const std::string& local_cert,
33 crypto::RSAPrivateKey* local_private_key, 33 crypto::RSAPrivateKey* local_private_key,
34 const std::string& shared_secret); 34 const std::string& shared_secret);
35 virtual ~V1HostChannelAuthenticator(); 35 virtual ~V1HostChannelAuthenticator();
36 36
37 // ChannelAuthenticator interface. 37 // ChannelAuthenticator interface.
38 virtual void SecureAndAuthenticate( 38 virtual void SecureAndAuthenticate(
39 net::StreamSocket* socket, const DoneCallback& done_callback) OVERRIDE; 39 net::StreamSocket* socket, const DoneCallback& done_callback) OVERRIDE;
40 40
41 private: 41 private:
42 void OnConnected(int result); 42 void OnConnected(int result);
43 void DoAuthRead(); 43 void DoAuthRead();
44 void OnAuthBytesRead(int result); 44 void OnAuthBytesRead(int result);
(...skipping 11 matching lines...) Expand all
56 net::OldCompletionCallbackImpl<V1HostChannelAuthenticator> 56 net::OldCompletionCallbackImpl<V1HostChannelAuthenticator>
57 connect_callback_; 57 connect_callback_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(V1HostChannelAuthenticator); 59 DISALLOW_COPY_AND_ASSIGN(V1HostChannelAuthenticator);
60 }; 60 };
61 61
62 } // namespace protocol 62 } // namespace protocol
63 } // namespace remoting 63 } // namespace remoting
64 64
65 #endif // REMOTING_PROTOCOL_V1_HOST_CHANNEL_AUTHENTICATOR_H_ 65 #endif // REMOTING_PROTOCOL_V1_HOST_CHANNEL_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698