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 // This class is useful for building a simple URLRequestContext. Most creators | 5 // This class is useful for building a simple URLRequestContext. Most creators |
6 // of new URLRequestContexts should use this helper class to construct it. Call | 6 // of new URLRequestContexts should use this helper class to construct it. Call |
7 // any configuration params, and when done, invoke Build() to construct the | 7 // any configuration params, and when done, invoke Build() to construct the |
8 // URLRequestContext. This URLRequestContext will own all its own storage. | 8 // URLRequestContext. This URLRequestContext will own all its own storage. |
9 // | 9 // |
10 // URLRequestContextBuilder and its associated params classes are initially | 10 // URLRequestContextBuilder and its associated params classes are initially |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // These fields mirror those in HttpNetworkSession::Params; | 90 // These fields mirror those in HttpNetworkSession::Params; |
91 bool ignore_certificate_errors; | 91 bool ignore_certificate_errors; |
92 HostMappingRules* host_mapping_rules; | 92 HostMappingRules* host_mapping_rules; |
93 uint16_t testing_fixed_http_port; | 93 uint16_t testing_fixed_http_port; |
94 uint16_t testing_fixed_https_port; | 94 uint16_t testing_fixed_https_port; |
95 bool enable_http2; | 95 bool enable_http2; |
96 bool enable_quic; | 96 bool enable_quic; |
97 std::string quic_user_agent_id; | 97 std::string quic_user_agent_id; |
98 int quic_max_server_configs_stored_in_properties; | 98 int quic_max_server_configs_stored_in_properties; |
99 bool quic_delay_tcp_race; | 99 bool quic_delay_tcp_race; |
100 int quic_max_number_of_lossy_connections; | |
101 std::unordered_set<std::string> quic_host_whitelist; | 100 std::unordered_set<std::string> quic_host_whitelist; |
102 bool quic_prefer_aes; | 101 bool quic_prefer_aes; |
103 float quic_packet_loss_threshold; | |
104 int quic_idle_connection_timeout_seconds; | 102 int quic_idle_connection_timeout_seconds; |
105 QuicTagVector quic_connection_options; | 103 QuicTagVector quic_connection_options; |
106 bool quic_close_sessions_on_ip_change; | 104 bool quic_close_sessions_on_ip_change; |
107 bool quic_migrate_sessions_on_network_change; | 105 bool quic_migrate_sessions_on_network_change; |
108 bool quic_migrate_sessions_early; | 106 bool quic_migrate_sessions_early; |
109 bool quic_disable_bidirectional_streams; | 107 bool quic_disable_bidirectional_streams; |
110 bool quic_race_cert_verification; | 108 bool quic_race_cert_verification; |
111 }; | 109 }; |
112 | 110 |
113 URLRequestContextBuilder(); | 111 URLRequestContextBuilder(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 void set_quic_max_server_configs_stored_in_properties( | 228 void set_quic_max_server_configs_stored_in_properties( |
231 int quic_max_server_configs_stored_in_properties) { | 229 int quic_max_server_configs_stored_in_properties) { |
232 http_network_session_params_.quic_max_server_configs_stored_in_properties = | 230 http_network_session_params_.quic_max_server_configs_stored_in_properties = |
233 quic_max_server_configs_stored_in_properties; | 231 quic_max_server_configs_stored_in_properties; |
234 } | 232 } |
235 | 233 |
236 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) { | 234 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) { |
237 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race; | 235 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race; |
238 } | 236 } |
239 | 237 |
240 void set_quic_max_number_of_lossy_connections( | |
241 int quic_max_number_of_lossy_connections) { | |
242 http_network_session_params_.quic_max_number_of_lossy_connections = | |
243 quic_max_number_of_lossy_connections; | |
244 } | |
245 | |
246 void set_quic_packet_loss_threshold(float quic_packet_loss_threshold) { | |
247 http_network_session_params_.quic_packet_loss_threshold = | |
248 quic_packet_loss_threshold; | |
249 } | |
250 | |
251 void set_quic_idle_connection_timeout_seconds( | 238 void set_quic_idle_connection_timeout_seconds( |
252 int quic_idle_connection_timeout_seconds) { | 239 int quic_idle_connection_timeout_seconds) { |
253 http_network_session_params_.quic_idle_connection_timeout_seconds = | 240 http_network_session_params_.quic_idle_connection_timeout_seconds = |
254 quic_idle_connection_timeout_seconds; | 241 quic_idle_connection_timeout_seconds; |
255 } | 242 } |
256 | 243 |
257 void set_quic_host_whitelist( | 244 void set_quic_host_whitelist( |
258 const std::unordered_set<std::string>& quic_host_whitelist) { | 245 const std::unordered_set<std::string>& quic_host_whitelist) { |
259 http_network_session_params_.quic_host_whitelist = quic_host_whitelist; | 246 http_network_session_params_.quic_host_whitelist = quic_host_whitelist; |
260 } | 247 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 // Not owned by the context builder. Once it is set to a non-null value, it | 370 // Not owned by the context builder. Once it is set to a non-null value, it |
384 // is guaranteed to be non-null during the lifetime of |this|. | 371 // is guaranteed to be non-null during the lifetime of |this|. |
385 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; | 372 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; |
386 | 373 |
387 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 374 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
388 }; | 375 }; |
389 | 376 |
390 } // namespace net | 377 } // namespace net |
391 | 378 |
392 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 379 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
OLD | NEW |