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