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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 // Populates |*npn_protos| with protocols to be used with NPN. | 276 // Populates |*npn_protos| with protocols to be used with NPN. |
277 void GetNpnProtos(NextProtoVector* npn_protos) const; | 277 void GetNpnProtos(NextProtoVector* npn_protos) const; |
278 | 278 |
279 // Populates |server_config| and |proxy_config| based on this session and | 279 // Populates |server_config| and |proxy_config| based on this session and |
280 // |request|. | 280 // |request|. |
281 void GetSSLConfig(const HttpRequestInfo& request, | 281 void GetSSLConfig(const HttpRequestInfo& request, |
282 SSLConfig* server_config, | 282 SSLConfig* server_config, |
283 SSLConfig* proxy_config) const; | 283 SSLConfig* proxy_config) const; |
284 | 284 |
285 // TODO(ricea): Remove this by October 2016. | |
286 void IncrementActiveWebSockets() { ++active_websockets_; } | |
287 void DecrementActiveWebSockets() { --active_websockets_; } | |
288 | |
289 private: | 285 private: |
290 friend class HttpNetworkSessionPeer; | 286 friend class HttpNetworkSessionPeer; |
291 | 287 |
292 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); | 288 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); |
293 | 289 |
294 // Flush sockets on low memory notifications callback. | 290 // Flush sockets on low memory notifications callback. |
295 void OnMemoryPressure( | 291 void OnMemoryPressure( |
296 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); | 292 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); |
297 | 293 |
298 NetLog* const net_log_; | 294 NetLog* const net_log_; |
(...skipping 14 matching lines...) Expand all Loading... |
313 std::unique_ptr<HttpStreamFactory> http_stream_factory_; | 309 std::unique_ptr<HttpStreamFactory> http_stream_factory_; |
314 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket_; | 310 std::unique_ptr<HttpStreamFactory> http_stream_factory_for_websocket_; |
315 std::set<HttpResponseBodyDrainer*> response_drainers_; | 311 std::set<HttpResponseBodyDrainer*> response_drainers_; |
316 | 312 |
317 NextProtoVector next_protos_; | 313 NextProtoVector next_protos_; |
318 bool enabled_protocols_[NUM_VALID_ALTERNATE_PROTOCOLS]; | 314 bool enabled_protocols_[NUM_VALID_ALTERNATE_PROTOCOLS]; |
319 | 315 |
320 Params params_; | 316 Params params_; |
321 | 317 |
322 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 318 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
323 | |
324 // TODO(ricea): Remove this by October 2016. | |
325 int active_websockets_ = 0; | |
326 }; | 319 }; |
327 | 320 |
328 } // namespace net | 321 } // namespace net |
329 | 322 |
330 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 323 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
OLD | NEW |