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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 HostMappingRules* host_mapping_rules; | 89 HostMappingRules* host_mapping_rules; |
90 uint16_t testing_fixed_http_port; | 90 uint16_t testing_fixed_http_port; |
91 uint16_t testing_fixed_https_port; | 91 uint16_t testing_fixed_https_port; |
92 bool enable_spdy31; | 92 bool enable_spdy31; |
93 bool enable_http2; | 93 bool enable_http2; |
94 bool parse_alternative_services; | 94 bool parse_alternative_services; |
95 bool enable_alternative_service_with_different_host; | 95 bool enable_alternative_service_with_different_host; |
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 int quic_max_number_of_lossy_connections; | 100 int quic_max_number_of_lossy_connections; |
100 std::unordered_set<std::string> quic_host_whitelist; | 101 std::unordered_set<std::string> quic_host_whitelist; |
101 bool quic_prefer_aes; | 102 bool quic_prefer_aes; |
102 float quic_packet_loss_threshold; | 103 float quic_packet_loss_threshold; |
103 int quic_idle_connection_timeout_seconds; | 104 int quic_idle_connection_timeout_seconds; |
104 QuicTagVector quic_connection_options; | 105 QuicTagVector quic_connection_options; |
105 bool quic_close_sessions_on_ip_change; | 106 bool quic_close_sessions_on_ip_change; |
106 bool quic_migrate_sessions_on_network_change; | 107 bool quic_migrate_sessions_on_network_change; |
107 bool quic_migrate_sessions_early; | 108 bool quic_migrate_sessions_early; |
108 bool quic_disable_bidirectional_streams; | 109 bool quic_disable_bidirectional_streams; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 void set_quic_user_agent_id(const std::string& quic_user_agent_id) { | 225 void set_quic_user_agent_id(const std::string& quic_user_agent_id) { |
225 http_network_session_params_.quic_user_agent_id = quic_user_agent_id; | 226 http_network_session_params_.quic_user_agent_id = quic_user_agent_id; |
226 } | 227 } |
227 | 228 |
228 void set_quic_max_server_configs_stored_in_properties( | 229 void set_quic_max_server_configs_stored_in_properties( |
229 int quic_max_server_configs_stored_in_properties) { | 230 int quic_max_server_configs_stored_in_properties) { |
230 http_network_session_params_.quic_max_server_configs_stored_in_properties = | 231 http_network_session_params_.quic_max_server_configs_stored_in_properties = |
231 quic_max_server_configs_stored_in_properties; | 232 quic_max_server_configs_stored_in_properties; |
232 } | 233 } |
233 | 234 |
| 235 void set_quic_delay_tcp_race(bool quic_delay_tcp_race) { |
| 236 http_network_session_params_.quic_delay_tcp_race = quic_delay_tcp_race; |
| 237 } |
| 238 |
234 void set_quic_max_number_of_lossy_connections( | 239 void set_quic_max_number_of_lossy_connections( |
235 int quic_max_number_of_lossy_connections) { | 240 int quic_max_number_of_lossy_connections) { |
236 http_network_session_params_.quic_max_number_of_lossy_connections = | 241 http_network_session_params_.quic_max_number_of_lossy_connections = |
237 quic_max_number_of_lossy_connections; | 242 quic_max_number_of_lossy_connections; |
238 } | 243 } |
239 | 244 |
240 void set_quic_packet_loss_threshold(float quic_packet_loss_threshold) { | 245 void set_quic_packet_loss_threshold(float quic_packet_loss_threshold) { |
241 http_network_session_params_.quic_packet_loss_threshold = | 246 http_network_session_params_.quic_packet_loss_threshold = |
242 quic_packet_loss_threshold; | 247 quic_packet_loss_threshold; |
243 } | 248 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 std::unique_ptr<HttpServerProperties> http_server_properties_; | 370 std::unique_ptr<HttpServerProperties> http_server_properties_; |
366 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> | 371 std::map<std::string, std::unique_ptr<URLRequestJobFactory::ProtocolHandler>> |
367 protocol_handlers_; | 372 protocol_handlers_; |
368 | 373 |
369 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 374 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
370 }; | 375 }; |
371 | 376 |
372 } // namespace net | 377 } // namespace net |
373 | 378 |
374 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 379 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
OLD | NEW |