OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BLIMP_NET_SSL_CLIENT_TRANSPORT_H_ | |
6 #define BLIMP_NET_SSL_CLIENT_TRANSPORT_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/callback_forward.h" | |
11 #include "base/macros.h" | |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "blimp/net/blimp_net_export.h" | |
14 #include "blimp/net/blimp_transport.h" | |
15 #include "blimp/net/exact_match_cert_verifier.h" | |
16 #include "blimp/net/tcp_client_transport.h" | |
17 #include "net/base/address_list.h" | |
18 #include "net/base/net_errors.h" | |
19 #include "net/http/transport_security_state.h" | |
20 | |
21 namespace net { | |
22 class ClientSocketFactory; | |
23 class NetLog; | |
24 class StreamSocket; | |
25 class TCPClientSocket; | |
26 class TransportSecurityState; | |
27 } // namespace net | |
28 | |
29 namespace blimp { | |
30 | |
31 class BlimpConnection; | |
32 | |
33 // Creates and connects SSL socket connections to Blimplets. | |
Wez
2016/02/18 00:40:50
s/Blimplets/Engines
Kevin M
2016/02/18 23:35:47
Done, with singular "Engine" (the instance is boun
| |
34 class BLIMP_NET_EXPORT SSLClientTransport : public TCPClientTransport { | |
35 public: | |
36 // |addresses|: a list of addresses to connect to. | |
37 // |cert|: the certificate required from the remote peer. | |
38 // SSL connections that use different certificates are rejected. | |
39 // |net_log|: the socket event log (optional). | |
40 SSLClientTransport(const net::AddressList& addresses, | |
41 scoped_refptr<net::X509Certificate> cert, | |
42 net::NetLog* net_log); | |
43 | |
44 ~SSLClientTransport() override; | |
45 | |
46 // BlimpTransport implementation. | |
47 const std::string GetName() const override; | |
48 | |
49 private: | |
50 // Method called after TCPClientSocket::Connect finishes. | |
51 void OnTCPConnectComplete(int result) override; | |
52 | |
53 // Method called after SSLClientSocket::Connect finishes. | |
54 void OnSSLConnectComplete(int result); | |
55 | |
56 ExactMatchCertVerifier cert_verifier_; | |
57 net::TransportSecurityState transport_security_state_; | |
58 | |
59 DISALLOW_COPY_AND_ASSIGN(SSLClientTransport); | |
60 }; | |
61 | |
62 } // namespace blimp | |
63 | |
64 #endif // BLIMP_NET_SSL_CLIENT_TRANSPORT_H_ | |
OLD | NEW |