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_NETWORK_SESSION_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_ |
6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ | 6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 std::unique_ptr<base::Value> QuicInfoToValue() const; | 262 std::unique_ptr<base::Value> QuicInfoToValue() const; |
263 | 263 |
264 void CloseAllConnections(); | 264 void CloseAllConnections(); |
265 void CloseIdleConnections(); | 265 void CloseIdleConnections(); |
266 | 266 |
267 // Returns the original Params used to construct this session. | 267 // Returns the original Params used to construct this session. |
268 const Params& params() const { return params_; } | 268 const Params& params() const { return params_; } |
269 | 269 |
270 bool IsProtocolEnabled(NextProto protocol) const; | 270 bool IsProtocolEnabled(NextProto protocol) const; |
271 | 271 |
| 272 void SetServerPushDelegate(std::unique_ptr<ServerPushDelegate> push_delegate); |
| 273 |
272 // Populates |*alpn_protos| with protocols to be used with ALPN. | 274 // Populates |*alpn_protos| with protocols to be used with ALPN. |
273 void GetAlpnProtos(NextProtoVector* alpn_protos) const; | 275 void GetAlpnProtos(NextProtoVector* alpn_protos) const; |
274 | 276 |
275 // Populates |server_config| and |proxy_config| based on this session and | 277 // Populates |server_config| and |proxy_config| based on this session and |
276 // |request|. | 278 // |request|. |
277 void GetSSLConfig(const HttpRequestInfo& request, | 279 void GetSSLConfig(const HttpRequestInfo& request, |
278 SSLConfig* server_config, | 280 SSLConfig* server_config, |
279 SSLConfig* proxy_config) const; | 281 SSLConfig* proxy_config) const; |
280 | 282 |
281 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name | 283 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name |
(...skipping 19 matching lines...) Expand all Loading... |
301 HttpAuthHandlerFactory* const http_auth_handler_factory_; | 303 HttpAuthHandlerFactory* const http_auth_handler_factory_; |
302 | 304 |
303 // Not const since it's modified by HttpNetworkSessionPeer for testing. | 305 // Not const since it's modified by HttpNetworkSessionPeer for testing. |
304 ProxyService* proxy_service_; | 306 ProxyService* proxy_service_; |
305 const scoped_refptr<SSLConfigService> ssl_config_service_; | 307 const scoped_refptr<SSLConfigService> ssl_config_service_; |
306 | 308 |
307 HttpAuthCache http_auth_cache_; | 309 HttpAuthCache http_auth_cache_; |
308 SSLClientAuthCache ssl_client_auth_cache_; | 310 SSLClientAuthCache ssl_client_auth_cache_; |
309 std::unique_ptr<ClientSocketPoolManager> normal_socket_pool_manager_; | 311 std::unique_ptr<ClientSocketPoolManager> normal_socket_pool_manager_; |
310 std::unique_ptr<ClientSocketPoolManager> websocket_socket_pool_manager_; | 312 std::unique_ptr<ClientSocketPoolManager> websocket_socket_pool_manager_; |
| 313 std::unique_ptr<ServerPushDelegate> push_delegate_; |
311 QuicStreamFactory quic_stream_factory_; | 314 QuicStreamFactory quic_stream_factory_; |
312 SpdySessionPool spdy_session_pool_; | 315 SpdySessionPool spdy_session_pool_; |
313 std::unique_ptr<HttpStreamFactory> http_stream_factory_; | 316 std::unique_ptr<HttpStreamFactory> http_stream_factory_; |
314 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket_; | 317 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket_; |
315 std::map<HttpResponseBodyDrainer*, std::unique_ptr<HttpResponseBodyDrainer>> | 318 std::map<HttpResponseBodyDrainer*, std::unique_ptr<HttpResponseBodyDrainer>> |
316 response_drainers_; | 319 response_drainers_; |
317 std::unique_ptr<NetworkThrottleManager> network_stream_throttler_; | 320 std::unique_ptr<NetworkThrottleManager> network_stream_throttler_; |
318 | 321 |
319 NextProtoVector next_protos_; | 322 NextProtoVector next_protos_; |
320 | 323 |
321 Params params_; | 324 Params params_; |
322 | 325 |
323 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 326 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
324 }; | 327 }; |
325 | 328 |
326 } // namespace net | 329 } // namespace net |
327 | 330 |
328 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 331 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
OLD | NEW |