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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 // Enable HTTP/0.9 for HTTP/HTTPS on ports other than the default one for | 203 // Enable HTTP/0.9 for HTTP/HTTPS on ports other than the default one for |
204 // each protocol. | 204 // each protocol. |
205 bool http_09_on_non_default_ports_enabled; | 205 bool http_09_on_non_default_ports_enabled; |
206 | 206 |
207 // If true, only one pending preconnect is allowed to proxies that support | 207 // If true, only one pending preconnect is allowed to proxies that support |
208 // request priorities. | 208 // request priorities. |
209 bool restrict_to_one_preconnect_for_proxies; | 209 bool restrict_to_one_preconnect_for_proxies; |
210 }; | 210 }; |
211 | 211 |
| 212 // Describes new Params values for a dynamic Params update. |
| 213 // The purpose of this struct is that classes through which net params updates |
| 214 // are "wired through" don't need to know about concrete parameters. |
| 215 struct NET_EXPORT ParamsUpdate { |
| 216 bool enable_quic_new; |
| 217 }; |
| 218 |
212 enum SocketPoolType { | 219 enum SocketPoolType { |
213 NORMAL_SOCKET_POOL, | 220 NORMAL_SOCKET_POOL, |
214 WEBSOCKET_SOCKET_POOL, | 221 WEBSOCKET_SOCKET_POOL, |
215 NUM_SOCKET_POOL_TYPES | 222 NUM_SOCKET_POOL_TYPES |
216 }; | 223 }; |
217 | 224 |
218 explicit HttpNetworkSession(const Params& params); | 225 explicit HttpNetworkSession(const Params& params); |
219 ~HttpNetworkSession() override; | 226 ~HttpNetworkSession() override; |
220 | 227 |
221 HttpAuthCache* http_auth_cache() { return &http_auth_cache_; } | 228 HttpAuthCache* http_auth_cache() { return &http_auth_cache_; } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 // |request|. | 298 // |request|. |
292 void GetSSLConfig(const HttpRequestInfo& request, | 299 void GetSSLConfig(const HttpRequestInfo& request, |
293 SSLConfig* server_config, | 300 SSLConfig* server_config, |
294 SSLConfig* proxy_config) const; | 301 SSLConfig* proxy_config) const; |
295 | 302 |
296 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name | 303 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name |
297 // used by the parent MemoryAllocatorDump in the memory dump hierarchy. | 304 // used by the parent MemoryAllocatorDump in the memory dump hierarchy. |
298 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, | 305 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, |
299 const std::string& parent_absolute_name) const; | 306 const std::string& parent_absolute_name) const; |
300 | 307 |
| 308 // Evaluates if QUIC is enabled for new streams. |
| 309 bool IsQuicEnabled() const; |
| 310 |
| 311 // Sets QUIC enablement for new streams. |
| 312 void SetQuicEnabled(bool quic_enabled); |
| 313 |
| 314 // Update network params according to the passed |params_update|. |
| 315 void UpdateParams(ParamsUpdate params_update); |
| 316 |
301 private: | 317 private: |
302 friend class HttpNetworkSessionPeer; | 318 friend class HttpNetworkSessionPeer; |
303 | 319 |
304 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); | 320 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); |
305 | 321 |
306 // Flush sockets on low memory notifications callback. | 322 // Flush sockets on low memory notifications callback. |
307 void OnMemoryPressure( | 323 void OnMemoryPressure( |
308 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); | 324 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); |
309 | 325 |
310 // base::MemoryCoordinatorClient implementation: | 326 // base::MemoryCoordinatorClient implementation: |
(...skipping 24 matching lines...) Expand all Loading... |
335 NextProtoVector next_protos_; | 351 NextProtoVector next_protos_; |
336 | 352 |
337 Params params_; | 353 Params params_; |
338 | 354 |
339 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 355 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
340 }; | 356 }; |
341 | 357 |
342 } // namespace net | 358 } // namespace net |
343 | 359 |
344 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 360 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
OLD | NEW |