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