OLD | NEW |
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 // This StreamSocket implementation is to be used with servers that | 5 // This StreamSocket implementation is to be used with servers that |
6 // accept connections on port 443 but don't really use SSL. For | 6 // accept connections on port 443 but don't really use SSL. For |
7 // example, the Google Talk servers do this to bypass proxies. (The | 7 // example, the Google Talk servers do this to bypass proxies. (The |
8 // connection is upgraded to TLS as part of the XMPP negotiation, so | 8 // connection is upgraded to TLS as part of the XMPP negotiation, so |
9 // security is preserved.) A "fake" SSL handshake is done immediately | 9 // security is preserved.) A "fake" SSL handshake is done immediately |
10 // after connection to fool proxies into thinking that this is a real | 10 // after connection to fool proxies into thinking that this is a real |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 virtual void Disconnect() OVERRIDE; | 56 virtual void Disconnect() OVERRIDE; |
57 virtual bool IsConnected() const OVERRIDE; | 57 virtual bool IsConnected() const OVERRIDE; |
58 virtual bool IsConnectedAndIdle() const OVERRIDE; | 58 virtual bool IsConnectedAndIdle() const OVERRIDE; |
59 virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE; | 59 virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE; |
60 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE; | 60 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE; |
61 virtual const net::BoundNetLog& NetLog() const OVERRIDE; | 61 virtual const net::BoundNetLog& NetLog() const OVERRIDE; |
62 virtual void SetSubresourceSpeculation() OVERRIDE; | 62 virtual void SetSubresourceSpeculation() OVERRIDE; |
63 virtual void SetOmniboxSpeculation() OVERRIDE; | 63 virtual void SetOmniboxSpeculation() OVERRIDE; |
64 virtual bool WasEverUsed() const OVERRIDE; | 64 virtual bool WasEverUsed() const OVERRIDE; |
65 virtual bool UsingTCPFastOpen() const OVERRIDE; | 65 virtual bool UsingTCPFastOpen() const OVERRIDE; |
66 virtual int64 NumBytesRead() const OVERRIDE; | |
67 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | |
68 virtual bool WasNpnNegotiated() const OVERRIDE; | 66 virtual bool WasNpnNegotiated() const OVERRIDE; |
69 virtual net::NextProto GetNegotiatedProtocol() const OVERRIDE; | 67 virtual net::NextProto GetNegotiatedProtocol() const OVERRIDE; |
70 virtual bool GetSSLInfo(net::SSLInfo* ssl_info) OVERRIDE; | 68 virtual bool GetSSLInfo(net::SSLInfo* ssl_info) OVERRIDE; |
71 | 69 |
72 private: | 70 private: |
73 enum HandshakeState { | 71 enum HandshakeState { |
74 STATE_NONE, | 72 STATE_NONE, |
75 STATE_CONNECT, | 73 STATE_CONNECT, |
76 STATE_SEND_CLIENT_HELLO, | 74 STATE_SEND_CLIENT_HELLO, |
77 STATE_VERIFY_SERVER_HELLO, | 75 STATE_VERIFY_SERVER_HELLO, |
(...skipping 27 matching lines...) Expand all Loading... |
105 // The callback passed to Connect(). | 103 // The callback passed to Connect(). |
106 net::CompletionCallback user_connect_callback_; | 104 net::CompletionCallback user_connect_callback_; |
107 | 105 |
108 scoped_refptr<net::DrainableIOBuffer> write_buf_; | 106 scoped_refptr<net::DrainableIOBuffer> write_buf_; |
109 scoped_refptr<net::DrainableIOBuffer> read_buf_; | 107 scoped_refptr<net::DrainableIOBuffer> read_buf_; |
110 }; | 108 }; |
111 | 109 |
112 } // namespace jingle_glue | 110 } // namespace jingle_glue |
113 | 111 |
114 #endif // JINGLE_GLUE_FAKE_SSL_CLIENT_SOCKET_H_ | 112 #endif // JINGLE_GLUE_FAKE_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |