| 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 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
| 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 scoped_ptr<ProxyClientSocket> transport_socket_; | 160 scoped_ptr<ProxyClientSocket> transport_socket_; |
| 161 bool using_spdy_; | 161 bool using_spdy_; |
| 162 | 162 |
| 163 HttpResponseInfo error_response_info_; | 163 HttpResponseInfo error_response_info_; |
| 164 | 164 |
| 165 scoped_refptr<SpdyStream> spdy_stream_; | 165 scoped_refptr<SpdyStream> spdy_stream_; |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); | 167 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool | 170 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool : public ClientSocketPool { |
| 171 : public ClientSocketPool, public LayeredPool { | |
| 172 public: | 171 public: |
| 173 HttpProxyClientSocketPool( | 172 HttpProxyClientSocketPool( |
| 174 int max_sockets, | 173 int max_sockets, |
| 175 int max_sockets_per_group, | 174 int max_sockets_per_group, |
| 176 ClientSocketPoolHistograms* histograms, | 175 ClientSocketPoolHistograms* histograms, |
| 177 HostResolver* host_resolver, | 176 HostResolver* host_resolver, |
| 178 TransportClientSocketPool* transport_pool, | 177 TransportClientSocketPool* transport_pool, |
| 179 SSLClientSocketPool* ssl_pool, | 178 SSLClientSocketPool* ssl_pool, |
| 180 NetLog* net_log); | 179 NetLog* net_log); |
| 181 | 180 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 196 | 195 |
| 197 virtual void CancelRequest(const std::string& group_name, | 196 virtual void CancelRequest(const std::string& group_name, |
| 198 ClientSocketHandle* handle) OVERRIDE; | 197 ClientSocketHandle* handle) OVERRIDE; |
| 199 | 198 |
| 200 virtual void ReleaseSocket(const std::string& group_name, | 199 virtual void ReleaseSocket(const std::string& group_name, |
| 201 StreamSocket* socket, | 200 StreamSocket* socket, |
| 202 int id) OVERRIDE; | 201 int id) OVERRIDE; |
| 203 | 202 |
| 204 virtual void Flush() OVERRIDE; | 203 virtual void Flush() OVERRIDE; |
| 205 | 204 |
| 206 virtual bool IsStalled() const OVERRIDE; | |
| 207 | |
| 208 virtual void CloseIdleSockets() OVERRIDE; | 205 virtual void CloseIdleSockets() OVERRIDE; |
| 209 | 206 |
| 210 virtual int IdleSocketCount() const OVERRIDE; | 207 virtual int IdleSocketCount() const OVERRIDE; |
| 211 | 208 |
| 212 virtual int IdleSocketCountInGroup( | 209 virtual int IdleSocketCountInGroup( |
| 213 const std::string& group_name) const OVERRIDE; | 210 const std::string& group_name) const OVERRIDE; |
| 214 | 211 |
| 215 virtual LoadState GetLoadState( | 212 virtual LoadState GetLoadState( |
| 216 const std::string& group_name, | 213 const std::string& group_name, |
| 217 const ClientSocketHandle* handle) const OVERRIDE; | 214 const ClientSocketHandle* handle) const OVERRIDE; |
| 218 | 215 |
| 219 virtual void AddLayeredPool(LayeredPool* layered_pool) OVERRIDE; | |
| 220 | |
| 221 virtual void RemoveLayeredPool(LayeredPool* layered_pool) OVERRIDE; | |
| 222 | |
| 223 virtual base::DictionaryValue* GetInfoAsValue( | 216 virtual base::DictionaryValue* GetInfoAsValue( |
| 224 const std::string& name, | 217 const std::string& name, |
| 225 const std::string& type, | 218 const std::string& type, |
| 226 bool include_nested_pools) const OVERRIDE; | 219 bool include_nested_pools) const OVERRIDE; |
| 227 | 220 |
| 228 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; | 221 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; |
| 229 | 222 |
| 230 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; | 223 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; |
| 231 | 224 |
| 232 // LayeredPool methods: | |
| 233 virtual bool CloseOneIdleConnection() OVERRIDE; | |
| 234 | |
| 235 private: | 225 private: |
| 236 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase; | 226 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase; |
| 237 | 227 |
| 238 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory { | 228 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory { |
| 239 public: | 229 public: |
| 240 HttpProxyConnectJobFactory( | 230 HttpProxyConnectJobFactory( |
| 241 TransportClientSocketPool* transport_pool, | 231 TransportClientSocketPool* transport_pool, |
| 242 SSLClientSocketPool* ssl_pool, | 232 SSLClientSocketPool* ssl_pool, |
| 243 HostResolver* host_resolver, | 233 HostResolver* host_resolver, |
| 244 NetLog* net_log); | 234 NetLog* net_log); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 269 | 259 |
| 270 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); | 260 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); |
| 271 }; | 261 }; |
| 272 | 262 |
| 273 REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool, | 263 REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool, |
| 274 HttpProxySocketParams); | 264 HttpProxySocketParams); |
| 275 | 265 |
| 276 } // namespace net | 266 } // namespace net |
| 277 | 267 |
| 278 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 268 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |