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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Proxy resolution and connection functions. | 70 // Proxy resolution and connection functions. |
71 void ProcessProxyResolveDone(int status); | 71 void ProcessProxyResolveDone(int status); |
72 void ProcessConnectDone(int status); | 72 void ProcessConnectDone(int status); |
73 | 73 |
74 void CloseTransportSocket(); | 74 void CloseTransportSocket(); |
75 void RunUserConnectCallback(int status); | 75 void RunUserConnectCallback(int status); |
76 int ReconsiderProxyAfterError(int error); | 76 int ReconsiderProxyAfterError(int error); |
77 void ReportSuccessfulProxyConnection(); | 77 void ReportSuccessfulProxyConnection(); |
78 | 78 |
79 // Callbacks passed to net APIs. | 79 // Callbacks passed to net APIs. |
80 net::OldCompletionCallbackImpl<ProxyResolvingClientSocket> | 80 net::CompletionCallback proxy_resolve_callback_; |
81 proxy_resolve_callback_; | 81 net::CompletionCallback connect_callback_; |
82 net::OldCompletionCallbackImpl<ProxyResolvingClientSocket> connect_callback_; | |
83 | 82 |
84 scoped_refptr<net::HttpNetworkSession> network_session_; | 83 scoped_refptr<net::HttpNetworkSession> network_session_; |
85 | 84 |
86 // The transport socket. | 85 // The transport socket. |
87 scoped_ptr<net::ClientSocketHandle> transport_; | 86 scoped_ptr<net::ClientSocketHandle> transport_; |
88 | 87 |
89 const net::SSLConfig ssl_config_; | 88 const net::SSLConfig ssl_config_; |
90 net::ProxyService::PacRequest* pac_request_; | 89 net::ProxyService::PacRequest* pac_request_; |
91 net::ProxyInfo proxy_info_; | 90 net::ProxyInfo proxy_info_; |
92 net::HostPortPair dest_host_port_pair_; | 91 net::HostPortPair dest_host_port_pair_; |
93 bool tried_direct_connect_fallback_; | 92 bool tried_direct_connect_fallback_; |
94 net::BoundNetLog bound_net_log_; | 93 net::BoundNetLog bound_net_log_; |
95 base::WeakPtrFactory<ProxyResolvingClientSocket> weak_factory_; | 94 base::WeakPtrFactory<ProxyResolvingClientSocket> weak_factory_; |
96 | 95 |
97 // The callback passed to Connect(). | 96 // The callback passed to Connect(). |
98 net::CompletionCallback user_connect_callback_; | 97 net::CompletionCallback user_connect_callback_; |
99 }; | 98 }; |
100 | 99 |
101 } // namespace notifier | 100 } // namespace notifier |
102 | 101 |
103 #endif // JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ | 102 #endif // JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ |
OLD | NEW |