OLD | NEW |
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_CLIENT_CHANNEL_AUTHENTICATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_V1_CLIENT_CHANNEL_AUTHENTICATOR_H_ |
6 #define REMOTING_PROTOCOL_V1_CLIENT_CHANNEL_AUTHENTICATOR_H_ | 6 #define REMOTING_PROTOCOL_V1_CLIENT_CHANNEL_AUTHENTICATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
15 #include "remoting/protocol/channel_authenticator.h" | 15 #include "remoting/protocol/channel_authenticator.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 class CertVerifier; | 18 class CertVerifier; |
19 class DrainableIOBuffer; | 19 class DrainableIOBuffer; |
20 class GrowableIOBuffer; | 20 class GrowableIOBuffer; |
21 class SSLClientSocket; | 21 class SSLClientSocket; |
22 } // namespace net | 22 } // namespace net |
23 | 23 |
24 namespace remoting { | 24 namespace remoting { |
25 namespace protocol { | 25 namespace protocol { |
26 | 26 |
27 class V1ClientChannelAuthenticator : public ChannelAuthenticator, | 27 class V1ClientChannelAuthenticator : public ChannelAuthenticator, |
28 public base::NonThreadSafe { | 28 public base::NonThreadSafe { |
29 public: | 29 public: |
30 V1ClientChannelAuthenticator(const std::string& host_cert, | 30 V1ClientChannelAuthenticator(const std::string& host_cert, |
31 const std::string& shared_secret); | 31 const std::string& shared_secret); |
32 virtual ~V1ClientChannelAuthenticator(); | 32 virtual ~V1ClientChannelAuthenticator(); |
33 | 33 |
34 // ChannelAuthenticator implementation. | 34 // ChannelAuthenticator implementation. |
35 virtual void SecureAndAuthenticate( | 35 virtual void SecureAndAuthenticate( |
36 net::StreamSocket* socket, const DoneCallback& done_callback) OVERRIDE; | 36 net::StreamSocket* socket, const DoneCallback& done_callback) OVERRIDE; |
37 | 37 |
38 private: | 38 private: |
(...skipping 15 matching lines...) Expand all Loading... |
54 net::OldCompletionCallbackImpl<V1ClientChannelAuthenticator> | 54 net::OldCompletionCallbackImpl<V1ClientChannelAuthenticator> |
55 auth_write_callback_; | 55 auth_write_callback_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(V1ClientChannelAuthenticator); | 57 DISALLOW_COPY_AND_ASSIGN(V1ClientChannelAuthenticator); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace protocol | 60 } // namespace protocol |
61 } // namespace remoting | 61 } // namespace remoting |
62 | 62 |
63 #endif // REMOTING_PROTOCOL_V1_CLIENT_CHANNEL_AUTHENTICATOR_H_ | 63 #endif // REMOTING_PROTOCOL_V1_CLIENT_CHANNEL_AUTHENTICATOR_H_ |
OLD | NEW |