Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Side by Side Diff: net/http/http_network_session.h

Issue 2600973002: Implement HTTP/2 settings field trial parameters. (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
22 #include "base/memory/weak_ptr.h" 22 #include "base/memory/weak_ptr.h"
23 #include "base/threading/non_thread_safe.h" 23 #include "base/threading/non_thread_safe.h"
24 #include "net/base/host_port_pair.h" 24 #include "net/base/host_port_pair.h"
25 #include "net/base/net_export.h" 25 #include "net/base/net_export.h"
26 #include "net/dns/host_resolver.h" 26 #include "net/dns/host_resolver.h"
27 #include "net/http/http_auth_cache.h" 27 #include "net/http/http_auth_cache.h"
28 #include "net/http/http_stream_factory.h" 28 #include "net/http/http_stream_factory.h"
29 #include "net/quic/chromium/quic_stream_factory.h" 29 #include "net/quic/chromium/quic_stream_factory.h"
30 #include "net/socket/next_proto.h" 30 #include "net/socket/next_proto.h"
31 #include "net/spdy/spdy_protocol.h"
31 #include "net/spdy/spdy_session_pool.h" 32 #include "net/spdy/spdy_session_pool.h"
32 #include "net/ssl/ssl_client_auth_cache.h" 33 #include "net/ssl/ssl_client_auth_cache.h"
33 34
34 namespace base { 35 namespace base {
35 class Value; 36 class Value;
36 namespace trace_event { 37 namespace trace_event {
37 class ProcessMemoryDump; 38 class ProcessMemoryDump;
38 } 39 }
39 } 40 }
40 41
(...skipping 17 matching lines...) Expand all
58 class ProxyService; 59 class ProxyService;
59 class QuicClock; 60 class QuicClock;
60 class QuicCryptoClientStreamFactory; 61 class QuicCryptoClientStreamFactory;
61 class SocketPerformanceWatcherFactory; 62 class SocketPerformanceWatcherFactory;
62 class SOCKSClientSocketPool; 63 class SOCKSClientSocketPool;
63 class SSLClientSocketPool; 64 class SSLClientSocketPool;
64 class SSLConfigService; 65 class SSLConfigService;
65 class TransportClientSocketPool; 66 class TransportClientSocketPool;
66 class TransportSecurityState; 67 class TransportSecurityState;
67 68
69 // Specifies the maximum HPACK dynamic table size the server is allowed to set.
70 const uint32_t kSpdyMaxHeaderTableSize = 64 * 1024;
71
72 // Specifies the maximum concurrent streams server could send (via push).
73 const uint32_t kSpdyMaxConcurrentPushedStreams = 1000;
74
68 // This class holds session objects used by HttpNetworkTransaction objects. 75 // This class holds session objects used by HttpNetworkTransaction objects.
69 class NET_EXPORT HttpNetworkSession 76 class NET_EXPORT HttpNetworkSession
70 : NON_EXPORTED_BASE(public base::NonThreadSafe), 77 : NON_EXPORTED_BASE(public base::NonThreadSafe),
71 public base::MemoryCoordinatorClient { 78 public base::MemoryCoordinatorClient {
72 public: 79 public:
73 struct NET_EXPORT Params { 80 struct NET_EXPORT Params {
74 Params(); 81 Params();
75 Params(const Params& other); 82 Params(const Params& other);
76 ~Params(); 83 ~Params();
77 84
(...skipping 13 matching lines...) Expand all
91 SocketPerformanceWatcherFactory* socket_performance_watcher_factory; 98 SocketPerformanceWatcherFactory* socket_performance_watcher_factory;
92 bool ignore_certificate_errors; 99 bool ignore_certificate_errors;
93 uint16_t testing_fixed_http_port; 100 uint16_t testing_fixed_http_port;
94 uint16_t testing_fixed_https_port; 101 uint16_t testing_fixed_https_port;
95 bool enable_tcp_fast_open_for_ssl; 102 bool enable_tcp_fast_open_for_ssl;
96 103
97 // Use SPDY ping frames to test for connection health after idle. 104 // Use SPDY ping frames to test for connection health after idle.
98 bool enable_spdy_ping_based_connection_checking; 105 bool enable_spdy_ping_based_connection_checking;
99 bool enable_http2; 106 bool enable_http2;
100 size_t spdy_session_max_recv_window_size; 107 size_t spdy_session_max_recv_window_size;
101 size_t spdy_stream_max_recv_window_size; 108 // HTTP/2 connection settings.
109 // Unknown settings will still be sent to the server.
110 SettingsMap http2_settings;
102 // Source of time for SPDY connections. 111 // Source of time for SPDY connections.
103 SpdySessionPool::TimeFunc time_func; 112 SpdySessionPool::TimeFunc time_func;
104 // Whether to enable HTTP/2 Alt-Svc entries with hostname different than 113 // Whether to enable HTTP/2 Alt-Svc entries with hostname different than
105 // that of the origin. 114 // that of the origin.
106 bool enable_http2_alternative_service_with_different_host; 115 bool enable_http2_alternative_service_with_different_host;
107 // Whether to enable QUIC Alt-Svc entries with hostname different than that 116 // Whether to enable QUIC Alt-Svc entries with hostname different than that
108 // of the origin. 117 // of the origin.
109 bool enable_quic_alternative_service_with_different_host; 118 bool enable_quic_alternative_service_with_different_host;
110 119
111 // Enables QUIC support. 120 // Enables QUIC support.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 299
291 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); 300 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type);
292 301
293 // Flush sockets on low memory notifications callback. 302 // Flush sockets on low memory notifications callback.
294 void OnMemoryPressure( 303 void OnMemoryPressure(
295 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); 304 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
296 305
297 // base::MemoryCoordinatorClient implementation: 306 // base::MemoryCoordinatorClient implementation:
298 void OnMemoryStateChange(base::MemoryState state) override; 307 void OnMemoryStateChange(base::MemoryState state) override;
299 308
309 // Keep all HTTP2 parameters in |http2_settings|, even the ones that are not
310 // implemented, to be sent to the server.
311 // Set default values for settings that |http2_settings| does not specify.
312 SettingsMap AddDefaultHttp2Settings(SettingsMap http2_settings);
313
300 NetLog* const net_log_; 314 NetLog* const net_log_;
301 HttpServerProperties* const http_server_properties_; 315 HttpServerProperties* const http_server_properties_;
302 CertVerifier* const cert_verifier_; 316 CertVerifier* const cert_verifier_;
303 HttpAuthHandlerFactory* const http_auth_handler_factory_; 317 HttpAuthHandlerFactory* const http_auth_handler_factory_;
304 318
305 // Not const since it's modified by HttpNetworkSessionPeer for testing. 319 // Not const since it's modified by HttpNetworkSessionPeer for testing.
306 ProxyService* proxy_service_; 320 ProxyService* proxy_service_;
307 const scoped_refptr<SSLConfigService> ssl_config_service_; 321 const scoped_refptr<SSLConfigService> ssl_config_service_;
308 322
309 HttpAuthCache http_auth_cache_; 323 HttpAuthCache http_auth_cache_;
(...skipping 12 matching lines...) Expand all
322 NextProtoVector next_protos_; 336 NextProtoVector next_protos_;
323 337
324 Params params_; 338 Params params_;
325 339
326 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; 340 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
327 }; 341 };
328 342
329 } // namespace net 343 } // namespace net
330 344
331 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ 345 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698