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 // 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 virtual void Disconnect(); | 55 virtual void Disconnect(); |
56 virtual bool IsConnected() const; | 56 virtual bool IsConnected() const; |
57 virtual bool IsConnectedAndIdle() const; | 57 virtual bool IsConnectedAndIdle() const; |
58 virtual int GetPeerAddress(net::AddressList* address) const; | 58 virtual int GetPeerAddress(net::AddressList* address) const; |
59 virtual int GetLocalAddress(net::IPEndPoint* address) const; | 59 virtual int GetLocalAddress(net::IPEndPoint* address) const; |
60 virtual const net::BoundNetLog& NetLog() const; | 60 virtual const net::BoundNetLog& NetLog() const; |
61 virtual void SetSubresourceSpeculation(); | 61 virtual void SetSubresourceSpeculation(); |
62 virtual void SetOmniboxSpeculation(); | 62 virtual void SetOmniboxSpeculation(); |
63 virtual bool WasEverUsed() const; | 63 virtual bool WasEverUsed() const; |
64 virtual bool UsingTCPFastOpen() const; | 64 virtual bool UsingTCPFastOpen() const; |
| 65 virtual int64 NumBytesRead() const; |
| 66 virtual int GetConnectTimeMicros() const; |
65 | 67 |
66 private: | 68 private: |
67 enum HandshakeState { | 69 enum HandshakeState { |
68 STATE_NONE, | 70 STATE_NONE, |
69 STATE_CONNECT, | 71 STATE_CONNECT, |
70 STATE_SEND_CLIENT_HELLO, | 72 STATE_SEND_CLIENT_HELLO, |
71 STATE_VERIFY_SERVER_HELLO, | 73 STATE_VERIFY_SERVER_HELLO, |
72 }; | 74 }; |
73 | 75 |
74 int DoHandshakeLoop(); | 76 int DoHandshakeLoop(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // The callback passed to Connect(). | 108 // The callback passed to Connect(). |
107 net::CompletionCallback* user_connect_callback_; | 109 net::CompletionCallback* user_connect_callback_; |
108 | 110 |
109 scoped_refptr<net::DrainableIOBuffer> write_buf_; | 111 scoped_refptr<net::DrainableIOBuffer> write_buf_; |
110 scoped_refptr<net::DrainableIOBuffer> read_buf_; | 112 scoped_refptr<net::DrainableIOBuffer> read_buf_; |
111 }; | 113 }; |
112 | 114 |
113 } // namespace notifier | 115 } // namespace notifier |
114 | 116 |
115 #endif // JINGLE_NOTIFIER_BASE_FAKE_SSL_CLIENT_SOCKET_H_ | 117 #endif // JINGLE_NOTIFIER_BASE_FAKE_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |