| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void SetOmniboxSpeculation() override; | 66 void SetOmniboxSpeculation() override; |
| 67 bool WasEverUsed() const override; | 67 bool WasEverUsed() const override; |
| 68 bool WasNpnNegotiated() const override; | 68 bool WasNpnNegotiated() const override; |
| 69 net::NextProto GetNegotiatedProtocol() const override; | 69 net::NextProto GetNegotiatedProtocol() const override; |
| 70 bool GetSSLInfo(net::SSLInfo* ssl_info) override; | 70 bool GetSSLInfo(net::SSLInfo* ssl_info) override; |
| 71 void GetConnectionAttempts(net::ConnectionAttempts* out) const override; | 71 void GetConnectionAttempts(net::ConnectionAttempts* out) const override; |
| 72 void ClearConnectionAttempts() override {} | 72 void ClearConnectionAttempts() override {} |
| 73 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override { | 73 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override { |
| 74 } | 74 } |
| 75 int64_t GetTotalReceivedBytes() const override; | 75 int64_t GetTotalReceivedBytes() const override; |
| 76 void DumpMemoryStats( |
| 77 base::trace_event::MemoryAllocatorDump* dump) const override {} |
| 76 | 78 |
| 77 private: | 79 private: |
| 78 enum HandshakeState { | 80 enum HandshakeState { |
| 79 STATE_NONE, | 81 STATE_NONE, |
| 80 STATE_CONNECT, | 82 STATE_CONNECT, |
| 81 STATE_SEND_CLIENT_HELLO, | 83 STATE_SEND_CLIENT_HELLO, |
| 82 STATE_VERIFY_SERVER_HELLO, | 84 STATE_VERIFY_SERVER_HELLO, |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 int DoHandshakeLoop(); | 87 int DoHandshakeLoop(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 110 // The callback passed to Connect(). | 112 // The callback passed to Connect(). |
| 111 net::CompletionCallback user_connect_callback_; | 113 net::CompletionCallback user_connect_callback_; |
| 112 | 114 |
| 113 scoped_refptr<net::DrainableIOBuffer> write_buf_; | 115 scoped_refptr<net::DrainableIOBuffer> write_buf_; |
| 114 scoped_refptr<net::DrainableIOBuffer> read_buf_; | 116 scoped_refptr<net::DrainableIOBuffer> read_buf_; |
| 115 }; | 117 }; |
| 116 | 118 |
| 117 } // namespace jingle_glue | 119 } // namespace jingle_glue |
| 118 | 120 |
| 119 #endif // JINGLE_GLUE_FAKE_SSL_CLIENT_SOCKET_H_ | 121 #endif // JINGLE_GLUE_FAKE_SSL_CLIENT_SOCKET_H_ |
| OLD | NEW |