| 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 wraps a ClientSocketHandle that is created | 5 // This StreamSocket implementation wraps a ClientSocketHandle that is created |
| 6 // from the client socket pool after resolving proxies. | 6 // from the client socket pool after resolving proxies. |
| 7 | 7 |
| 8 #ifndef JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ | 8 #ifndef JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ |
| 9 #define JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ | 9 #define JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | 60 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 // Proxy resolution and connection functions. | 63 // Proxy resolution and connection functions. |
| 64 void ProcessProxyResolveDone(int status); | 64 void ProcessProxyResolveDone(int status); |
| 65 void ProcessConnectDone(int status); | 65 void ProcessConnectDone(int status); |
| 66 | 66 |
| 67 void CloseTransportSocket(); | 67 void CloseTransportSocket(); |
| 68 void RunUserConnectCallback(int status); | 68 void RunUserConnectCallback(int status); |
| 69 int ReconsiderProxyAfterError(int error); | 69 int ReconsiderProxyAfterError(int error); |
| 70 void ReportSuccessfulProxyConnection(); |
| 70 | 71 |
| 71 // Callbacks passed to net APIs. | 72 // Callbacks passed to net APIs. |
| 72 net::CompletionCallbackImpl<ProxyResolvingClientSocket> | 73 net::CompletionCallbackImpl<ProxyResolvingClientSocket> |
| 73 proxy_resolve_callback_; | 74 proxy_resolve_callback_; |
| 74 net::CompletionCallbackImpl<ProxyResolvingClientSocket> connect_callback_; | 75 net::CompletionCallbackImpl<ProxyResolvingClientSocket> connect_callback_; |
| 75 | 76 |
| 76 scoped_refptr<net::HttpNetworkSession> network_session_; | 77 scoped_refptr<net::HttpNetworkSession> network_session_; |
| 77 | 78 |
| 78 // The transport socket. | 79 // The transport socket. |
| 79 scoped_ptr<net::ClientSocketHandle> transport_; | 80 scoped_ptr<net::ClientSocketHandle> transport_; |
| 80 | 81 |
| 81 const net::SSLConfig ssl_config_; | 82 const net::SSLConfig ssl_config_; |
| 82 net::ProxyService::PacRequest* pac_request_; | 83 net::ProxyService::PacRequest* pac_request_; |
| 83 net::ProxyInfo proxy_info_; | 84 net::ProxyInfo proxy_info_; |
| 84 net::HostPortPair dest_host_port_pair_; | 85 net::HostPortPair dest_host_port_pair_; |
| 85 bool tried_direct_connect_fallback_; | 86 bool tried_direct_connect_fallback_; |
| 86 net::BoundNetLog bound_net_log_; | 87 net::BoundNetLog bound_net_log_; |
| 87 ScopedRunnableMethodFactory<ProxyResolvingClientSocket> | 88 ScopedRunnableMethodFactory<ProxyResolvingClientSocket> |
| 88 scoped_runnable_method_factory_; | 89 scoped_runnable_method_factory_; |
| 89 | 90 |
| 90 // The callback passed to Connect(). | 91 // The callback passed to Connect(). |
| 91 net::CompletionCallback* user_connect_callback_; | 92 net::CompletionCallback* user_connect_callback_; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace notifier | 95 } // namespace notifier |
| 95 | 96 |
| 96 #endif // JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ | 97 #endif // JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ |
| OLD | NEW |