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