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 #include "net/url_request/url_request_context_builder.h" | 5 #include "net/url_request/url_request_context_builder.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "net/dns/host_resolver.h" | 31 #include "net/dns/host_resolver.h" |
32 #include "net/http/http_auth_handler_factory.h" | 32 #include "net/http/http_auth_handler_factory.h" |
33 #include "net/http/http_cache.h" | 33 #include "net/http/http_cache.h" |
34 #include "net/http/http_network_layer.h" | 34 #include "net/http/http_network_layer.h" |
35 #include "net/http/http_server_properties_impl.h" | 35 #include "net/http/http_server_properties_impl.h" |
36 #include "net/http/http_server_properties_manager.h" | 36 #include "net/http/http_server_properties_manager.h" |
37 #include "net/http/transport_security_persister.h" | 37 #include "net/http/transport_security_persister.h" |
38 #include "net/http/transport_security_state.h" | 38 #include "net/http/transport_security_state.h" |
39 #include "net/net_features.h" | 39 #include "net/net_features.h" |
40 #include "net/quic/chromium/quic_stream_factory.h" | 40 #include "net/quic/chromium/quic_stream_factory.h" |
| 41 #include "net/quic/core/quic_constants.h" |
41 #include "net/ssl/channel_id_service.h" | 42 #include "net/ssl/channel_id_service.h" |
42 #include "net/ssl/default_channel_id_store.h" | 43 #include "net/ssl/default_channel_id_store.h" |
43 #include "net/ssl/ssl_config_service_defaults.h" | 44 #include "net/ssl/ssl_config_service_defaults.h" |
44 #include "net/url_request/data_protocol_handler.h" | 45 #include "net/url_request/data_protocol_handler.h" |
45 #include "net/url_request/static_http_user_agent_settings.h" | 46 #include "net/url_request/static_http_user_agent_settings.h" |
46 #include "net/url_request/url_request_context.h" | 47 #include "net/url_request/url_request_context.h" |
47 #include "net/url_request/url_request_context_storage.h" | 48 #include "net/url_request/url_request_context_storage.h" |
48 #include "net/url_request/url_request_intercepting_job_factory.h" | 49 #include "net/url_request/url_request_intercepting_job_factory.h" |
49 #include "net/url_request/url_request_interceptor.h" | 50 #include "net/url_request/url_request_interceptor.h" |
50 #include "net/url_request/url_request_job_factory_impl.h" | 51 #include "net/url_request/url_request_job_factory_impl.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 DISALLOW_COPY_AND_ASSIGN(ContainerURLRequestContext); | 186 DISALLOW_COPY_AND_ASSIGN(ContainerURLRequestContext); |
186 }; | 187 }; |
187 | 188 |
188 } // namespace | 189 } // namespace |
189 | 190 |
190 URLRequestContextBuilder::HttpCacheParams::HttpCacheParams() | 191 URLRequestContextBuilder::HttpCacheParams::HttpCacheParams() |
191 : type(IN_MEMORY), | 192 : type(IN_MEMORY), |
192 max_size(0) {} | 193 max_size(0) {} |
193 URLRequestContextBuilder::HttpCacheParams::~HttpCacheParams() {} | 194 URLRequestContextBuilder::HttpCacheParams::~HttpCacheParams() {} |
194 | 195 |
| 196 // TODO(mmenke): Default values should all match HttpNetworkSession's. Is there |
| 197 // a better way to manage that? |
195 URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams() | 198 URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams() |
196 : ignore_certificate_errors(false), | 199 : ignore_certificate_errors(false), |
197 testing_fixed_http_port(0), | 200 testing_fixed_http_port(0), |
198 testing_fixed_https_port(0), | 201 testing_fixed_https_port(0), |
| 202 enable_tcp_fast_open_for_ssl(false), |
| 203 enable_user_alternate_protocol_ports(false), |
199 enable_http2(true), | 204 enable_http2(true), |
200 enable_quic(false), | 205 enable_quic(false), |
| 206 quic_max_packet_length(kDefaultMaxPacketSize), |
201 quic_max_server_configs_stored_in_properties(0), | 207 quic_max_server_configs_stored_in_properties(0), |
202 quic_close_sessions_on_ip_change(false), | 208 quic_close_sessions_on_ip_change(false), |
203 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), | 209 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), |
204 quic_migrate_sessions_on_network_change(false), | 210 quic_migrate_sessions_on_network_change(false), |
205 quic_migrate_sessions_early(false), | 211 quic_migrate_sessions_early(false), |
206 quic_disable_bidirectional_streams(false), | 212 quic_disable_bidirectional_streams(false), |
207 quic_race_cert_verification(false) {} | 213 quic_race_cert_verification(false), |
| 214 enable_token_binding(false), |
| 215 http_09_on_non_default_ports_enabled(false) { |
| 216 quic_supported_versions.push_back(QUIC_VERSION_DEFAULT); |
| 217 } |
208 | 218 |
209 URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams() | 219 URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams() |
210 {} | 220 {} |
211 | 221 |
212 void URLRequestContextBuilder::HttpNetworkSessionParams::ConfigureSessionParams( | 222 void URLRequestContextBuilder::HttpNetworkSessionParams::ConfigureSessionParams( |
213 HttpNetworkSession::Params* network_session_params) const { | 223 HttpNetworkSession::Params* network_session_params) const { |
214 network_session_params->host_mapping_rules = host_mapping_rules; | 224 network_session_params->host_mapping_rules = host_mapping_rules; |
215 network_session_params->ignore_certificate_errors = ignore_certificate_errors; | 225 network_session_params->ignore_certificate_errors = ignore_certificate_errors; |
216 network_session_params->testing_fixed_http_port = testing_fixed_http_port; | 226 network_session_params->testing_fixed_http_port = testing_fixed_http_port; |
217 network_session_params->testing_fixed_https_port = testing_fixed_https_port; | 227 network_session_params->testing_fixed_https_port = testing_fixed_https_port; |
| 228 network_session_params->enable_tcp_fast_open_for_ssl = |
| 229 enable_tcp_fast_open_for_ssl; |
| 230 network_session_params->enable_user_alternate_protocol_ports = |
| 231 enable_user_alternate_protocol_ports; |
218 | 232 |
219 network_session_params->enable_http2 = enable_http2; | 233 network_session_params->enable_http2 = enable_http2; |
220 | 234 |
221 network_session_params->enable_quic = enable_quic; | 235 network_session_params->enable_quic = enable_quic; |
| 236 network_session_params->quic_supported_versions = quic_supported_versions; |
| 237 network_session_params->quic_max_packet_length = quic_max_packet_length; |
222 network_session_params->quic_user_agent_id = quic_user_agent_id; | 238 network_session_params->quic_user_agent_id = quic_user_agent_id; |
223 network_session_params->quic_max_server_configs_stored_in_properties = | 239 network_session_params->quic_max_server_configs_stored_in_properties = |
224 quic_max_server_configs_stored_in_properties; | 240 quic_max_server_configs_stored_in_properties; |
225 network_session_params->quic_connection_options = quic_connection_options; | 241 network_session_params->quic_connection_options = quic_connection_options; |
| 242 network_session_params->origins_to_force_quic_on = origins_to_force_quic_on; |
226 network_session_params->quic_close_sessions_on_ip_change = | 243 network_session_params->quic_close_sessions_on_ip_change = |
227 quic_close_sessions_on_ip_change; | 244 quic_close_sessions_on_ip_change; |
228 network_session_params->quic_idle_connection_timeout_seconds = | 245 network_session_params->quic_idle_connection_timeout_seconds = |
229 quic_idle_connection_timeout_seconds; | 246 quic_idle_connection_timeout_seconds; |
230 network_session_params->quic_migrate_sessions_on_network_change = | 247 network_session_params->quic_migrate_sessions_on_network_change = |
231 quic_migrate_sessions_on_network_change; | 248 quic_migrate_sessions_on_network_change; |
232 network_session_params->quic_migrate_sessions_early = | 249 network_session_params->quic_migrate_sessions_early = |
233 quic_migrate_sessions_early; | 250 quic_migrate_sessions_early; |
234 network_session_params->quic_disable_bidirectional_streams = | 251 network_session_params->quic_disable_bidirectional_streams = |
235 quic_disable_bidirectional_streams; | 252 quic_disable_bidirectional_streams; |
236 network_session_params->quic_race_cert_verification = | 253 network_session_params->quic_race_cert_verification = |
237 quic_race_cert_verification; | 254 quic_race_cert_verification; |
| 255 |
| 256 network_session_params->enable_token_binding = enable_token_binding; |
| 257 |
| 258 network_session_params->http_09_on_non_default_ports_enabled = |
| 259 http_09_on_non_default_ports_enabled; |
238 } | 260 } |
239 | 261 |
240 URLRequestContextBuilder::URLRequestContextBuilder() | 262 URLRequestContextBuilder::URLRequestContextBuilder() |
241 : name_(nullptr), | 263 : name_(nullptr), |
242 enable_brotli_(false), | 264 enable_brotli_(false), |
243 network_quality_estimator_(nullptr), | 265 network_quality_estimator_(nullptr), |
244 data_enabled_(false), | 266 data_enabled_(false), |
245 #if !BUILDFLAG(DISABLE_FILE_SUPPORT) | 267 #if !BUILDFLAG(DISABLE_FILE_SUPPORT) |
246 file_enabled_(false), | 268 file_enabled_(false), |
247 #endif | 269 #endif |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 std::unique_ptr<ProxyConfigService> proxy_config_service, | 562 std::unique_ptr<ProxyConfigService> proxy_config_service, |
541 URLRequestContext* url_request_context, | 563 URLRequestContext* url_request_context, |
542 HostResolver* host_resolver, | 564 HostResolver* host_resolver, |
543 NetworkDelegate* network_delegate, | 565 NetworkDelegate* network_delegate, |
544 NetLog* net_log) { | 566 NetLog* net_log) { |
545 return ProxyService::CreateUsingSystemProxyResolver( | 567 return ProxyService::CreateUsingSystemProxyResolver( |
546 std::move(proxy_config_service), net_log); | 568 std::move(proxy_config_service), net_log); |
547 } | 569 } |
548 | 570 |
549 } // namespace net | 571 } // namespace net |
OLD | NEW |