| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "net/base/host_port_pair.h" | 15 #include "net/base/host_port_pair.h" |
| 16 #include "net/base/net_export.h" | 16 #include "net/base/net_export.h" |
| 17 #include "net/http/http_auth.h" | 17 #include "net/http/http_auth.h" |
| 18 #include "net/http/http_response_info.h" | 18 #include "net/http/http_response_info.h" |
| 19 #include "net/http/proxy_client_socket.h" | 19 #include "net/http/proxy_client_socket.h" |
| 20 #include "net/socket/client_socket_pool.h" | 20 #include "net/socket/client_socket_pool.h" |
| 21 #include "net/socket/client_socket_pool_base.h" | 21 #include "net/socket/client_socket_pool_base.h" |
| 22 #include "net/socket/client_socket_pool_histograms.h" | |
| 23 #include "net/socket/ssl_client_socket.h" | 22 #include "net/socket/ssl_client_socket.h" |
| 24 #include "net/spdy/spdy_session.h" | 23 #include "net/spdy/spdy_session.h" |
| 25 | 24 |
| 26 namespace net { | 25 namespace net { |
| 27 | 26 |
| 28 class HttpAuthCache; | 27 class HttpAuthCache; |
| 29 class HttpAuthHandlerFactory; | 28 class HttpAuthHandlerFactory; |
| 30 class ProxyDelegate; | 29 class ProxyDelegate; |
| 31 class SSLClientSocketPool; | 30 class SSLClientSocketPool; |
| 32 class SSLSocketParams; | 31 class SSLSocketParams; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 }; | 180 }; |
| 182 | 181 |
| 183 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool | 182 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool |
| 184 : public ClientSocketPool, | 183 : public ClientSocketPool, |
| 185 public HigherLayeredPool { | 184 public HigherLayeredPool { |
| 186 public: | 185 public: |
| 187 typedef HttpProxySocketParams SocketParams; | 186 typedef HttpProxySocketParams SocketParams; |
| 188 | 187 |
| 189 HttpProxyClientSocketPool(int max_sockets, | 188 HttpProxyClientSocketPool(int max_sockets, |
| 190 int max_sockets_per_group, | 189 int max_sockets_per_group, |
| 191 ClientSocketPoolHistograms* histograms, | |
| 192 TransportClientSocketPool* transport_pool, | 190 TransportClientSocketPool* transport_pool, |
| 193 SSLClientSocketPool* ssl_pool, | 191 SSLClientSocketPool* ssl_pool, |
| 194 NetLog* net_log); | 192 NetLog* net_log); |
| 195 | 193 |
| 196 ~HttpProxyClientSocketPool() override; | 194 ~HttpProxyClientSocketPool() override; |
| 197 | 195 |
| 198 // ClientSocketPool implementation. | 196 // ClientSocketPool implementation. |
| 199 int RequestSocket(const std::string& group_name, | 197 int RequestSocket(const std::string& group_name, |
| 200 const void* connect_params, | 198 const void* connect_params, |
| 201 RequestPriority priority, | 199 RequestPriority priority, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 226 LoadState GetLoadState(const std::string& group_name, | 224 LoadState GetLoadState(const std::string& group_name, |
| 227 const ClientSocketHandle* handle) const override; | 225 const ClientSocketHandle* handle) const override; |
| 228 | 226 |
| 229 base::DictionaryValue* GetInfoAsValue( | 227 base::DictionaryValue* GetInfoAsValue( |
| 230 const std::string& name, | 228 const std::string& name, |
| 231 const std::string& type, | 229 const std::string& type, |
| 232 bool include_nested_pools) const override; | 230 bool include_nested_pools) const override; |
| 233 | 231 |
| 234 base::TimeDelta ConnectionTimeout() const override; | 232 base::TimeDelta ConnectionTimeout() const override; |
| 235 | 233 |
| 236 ClientSocketPoolHistograms* histograms() const override; | |
| 237 | |
| 238 // LowerLayeredPool implementation. | 234 // LowerLayeredPool implementation. |
| 239 bool IsStalled() const override; | 235 bool IsStalled() const override; |
| 240 | 236 |
| 241 void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override; | 237 void AddHigherLayeredPool(HigherLayeredPool* higher_pool) override; |
| 242 | 238 |
| 243 void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override; | 239 void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override; |
| 244 | 240 |
| 245 // HigherLayeredPool implementation. | 241 // HigherLayeredPool implementation. |
| 246 bool CloseOneIdleConnection() override; | 242 bool CloseOneIdleConnection() override; |
| 247 | 243 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 274 TransportClientSocketPool* const transport_pool_; | 270 TransportClientSocketPool* const transport_pool_; |
| 275 SSLClientSocketPool* const ssl_pool_; | 271 SSLClientSocketPool* const ssl_pool_; |
| 276 PoolBase base_; | 272 PoolBase base_; |
| 277 | 273 |
| 278 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); | 274 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); |
| 279 }; | 275 }; |
| 280 | 276 |
| 281 } // namespace net | 277 } // namespace net |
| 282 | 278 |
| 283 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 279 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |