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 base::TimeDelta GetConnectTimeMicros() const; | |
67 | 65 |
68 private: | 66 private: |
69 enum HandshakeState { | 67 enum HandshakeState { |
70 STATE_NONE, | 68 STATE_NONE, |
71 STATE_CONNECT, | 69 STATE_CONNECT, |
72 STATE_SEND_CLIENT_HELLO, | 70 STATE_SEND_CLIENT_HELLO, |
73 STATE_VERIFY_SERVER_HELLO, | 71 STATE_VERIFY_SERVER_HELLO, |
74 }; | 72 }; |
75 | 73 |
76 int DoHandshakeLoop(); | 74 int DoHandshakeLoop(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // The callback passed to Connect(). | 106 // The callback passed to Connect(). |
109 net::CompletionCallback* user_connect_callback_; | 107 net::CompletionCallback* user_connect_callback_; |
110 | 108 |
111 scoped_refptr<net::DrainableIOBuffer> write_buf_; | 109 scoped_refptr<net::DrainableIOBuffer> write_buf_; |
112 scoped_refptr<net::DrainableIOBuffer> read_buf_; | 110 scoped_refptr<net::DrainableIOBuffer> read_buf_; |
113 }; | 111 }; |
114 | 112 |
115 } // namespace notifier | 113 } // namespace notifier |
116 | 114 |
117 #endif // JINGLE_NOTIFIER_BASE_FAKE_SSL_CLIENT_SOCKET_H_ | 115 #endif // JINGLE_NOTIFIER_BASE_FAKE_SSL_CLIENT_SOCKET_H_ |
OLD | NEW |