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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 HttpResponseInfo error_response_info_; | 168 HttpResponseInfo error_response_info_; |
169 | 169 |
170 SpdyStreamRequest spdy_stream_request_; | 170 SpdyStreamRequest spdy_stream_request_; |
171 | 171 |
172 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); | 172 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); |
173 }; | 173 }; |
174 | 174 |
175 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool | 175 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool |
176 : public ClientSocketPool, | 176 : public ClientSocketPool, |
177 public LayeredPool { | 177 public HigherLayeredPool { |
178 public: | 178 public: |
179 typedef HttpProxySocketParams SocketParams; | 179 typedef HttpProxySocketParams SocketParams; |
180 | 180 |
181 HttpProxyClientSocketPool( | 181 HttpProxyClientSocketPool( |
182 int max_sockets, | 182 int max_sockets, |
183 int max_sockets_per_group, | 183 int max_sockets_per_group, |
184 ClientSocketPoolHistograms* histograms, | 184 ClientSocketPoolHistograms* histograms, |
185 HostResolver* host_resolver, | 185 HostResolver* host_resolver, |
186 TransportClientSocketPool* transport_pool, | 186 TransportClientSocketPool* transport_pool, |
187 SSLClientSocketPool* ssl_pool, | 187 SSLClientSocketPool* ssl_pool, |
(...skipping 16 matching lines...) Expand all Loading... |
204 | 204 |
205 virtual void CancelRequest(const std::string& group_name, | 205 virtual void CancelRequest(const std::string& group_name, |
206 ClientSocketHandle* handle) OVERRIDE; | 206 ClientSocketHandle* handle) OVERRIDE; |
207 | 207 |
208 virtual void ReleaseSocket(const std::string& group_name, | 208 virtual void ReleaseSocket(const std::string& group_name, |
209 scoped_ptr<StreamSocket> socket, | 209 scoped_ptr<StreamSocket> socket, |
210 int id) OVERRIDE; | 210 int id) OVERRIDE; |
211 | 211 |
212 virtual void FlushWithError(int error) OVERRIDE; | 212 virtual void FlushWithError(int error) OVERRIDE; |
213 | 213 |
214 virtual bool IsStalled() const OVERRIDE; | |
215 | |
216 virtual void CloseIdleSockets() OVERRIDE; | 214 virtual void CloseIdleSockets() OVERRIDE; |
217 | 215 |
218 virtual int IdleSocketCount() const OVERRIDE; | 216 virtual int IdleSocketCount() const OVERRIDE; |
219 | 217 |
220 virtual int IdleSocketCountInGroup( | 218 virtual int IdleSocketCountInGroup( |
221 const std::string& group_name) const OVERRIDE; | 219 const std::string& group_name) const OVERRIDE; |
222 | 220 |
223 virtual LoadState GetLoadState( | 221 virtual LoadState GetLoadState( |
224 const std::string& group_name, | 222 const std::string& group_name, |
225 const ClientSocketHandle* handle) const OVERRIDE; | 223 const ClientSocketHandle* handle) const OVERRIDE; |
226 | 224 |
227 virtual void AddLayeredPool(LayeredPool* layered_pool) OVERRIDE; | |
228 | |
229 virtual void RemoveLayeredPool(LayeredPool* layered_pool) OVERRIDE; | |
230 | |
231 virtual base::DictionaryValue* GetInfoAsValue( | 225 virtual base::DictionaryValue* GetInfoAsValue( |
232 const std::string& name, | 226 const std::string& name, |
233 const std::string& type, | 227 const std::string& type, |
234 bool include_nested_pools) const OVERRIDE; | 228 bool include_nested_pools) const OVERRIDE; |
235 | 229 |
236 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; | 230 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; |
237 | 231 |
238 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; | 232 virtual ClientSocketPoolHistograms* histograms() const OVERRIDE; |
239 | 233 |
240 // LayeredPool implementation. | 234 // LowerLayeredPool implementation. |
| 235 virtual bool IsStalled() const OVERRIDE; |
| 236 |
| 237 virtual void AddHigherLayeredPool(HigherLayeredPool* higher_pool) OVERRIDE; |
| 238 |
| 239 virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) OVERRIDE; |
| 240 |
| 241 // HigherLayeredPool implementation. |
241 virtual bool CloseOneIdleConnection() OVERRIDE; | 242 virtual bool CloseOneIdleConnection() OVERRIDE; |
242 | 243 |
243 private: | 244 private: |
244 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase; | 245 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase; |
245 | 246 |
246 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory { | 247 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory { |
247 public: | 248 public: |
248 HttpProxyConnectJobFactory( | 249 HttpProxyConnectJobFactory( |
249 TransportClientSocketPool* transport_pool, | 250 TransportClientSocketPool* transport_pool, |
250 SSLClientSocketPool* ssl_pool, | 251 SSLClientSocketPool* ssl_pool, |
(...skipping 21 matching lines...) Expand all Loading... |
272 TransportClientSocketPool* const transport_pool_; | 273 TransportClientSocketPool* const transport_pool_; |
273 SSLClientSocketPool* const ssl_pool_; | 274 SSLClientSocketPool* const ssl_pool_; |
274 PoolBase base_; | 275 PoolBase base_; |
275 | 276 |
276 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); | 277 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); |
277 }; | 278 }; |
278 | 279 |
279 } // namespace net | 280 } // namespace net |
280 | 281 |
281 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 282 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |