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/http/http_network_session.h" | 5 #include "net/http/http_network_session.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 quic_max_recent_disabled_reasons(kQuicMaxRecentDisabledReasons), | 122 quic_max_recent_disabled_reasons(kQuicMaxRecentDisabledReasons), |
123 quic_threshold_public_resets_post_handshake(0), | 123 quic_threshold_public_resets_post_handshake(0), |
124 quic_threshold_timeouts_streams_open(0), | 124 quic_threshold_timeouts_streams_open(0), |
125 quic_close_sessions_on_ip_change(false), | 125 quic_close_sessions_on_ip_change(false), |
126 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), | 126 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), |
127 quic_disable_preconnect_if_0rtt(false), | 127 quic_disable_preconnect_if_0rtt(false), |
128 quic_migrate_sessions_on_network_change(false), | 128 quic_migrate_sessions_on_network_change(false), |
129 quic_migrate_sessions_early(false), | 129 quic_migrate_sessions_early(false), |
130 quic_disable_bidirectional_streams(false), | 130 quic_disable_bidirectional_streams(false), |
131 quic_force_hol_blocking(false), | 131 quic_force_hol_blocking(false), |
132 quic_race_cert_verification(false), | |
133 proxy_delegate(NULL), | 132 proxy_delegate(NULL), |
134 enable_token_binding(false) { | 133 enable_token_binding(false) { |
135 quic_supported_versions.push_back(QUIC_VERSION_34); | 134 quic_supported_versions.push_back(QUIC_VERSION_34); |
136 } | 135 } |
137 | 136 |
138 HttpNetworkSession::Params::Params(const Params& other) = default; | 137 HttpNetworkSession::Params::Params(const Params& other) = default; |
139 | 138 |
140 HttpNetworkSession::Params::~Params() {} | 139 HttpNetworkSession::Params::~Params() {} |
141 | 140 |
142 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. | 141 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 params.quic_threshold_timeouts_streams_open, | 181 params.quic_threshold_timeouts_streams_open, |
183 params.quic_socket_receive_buffer_size, | 182 params.quic_socket_receive_buffer_size, |
184 params.quic_delay_tcp_race, | 183 params.quic_delay_tcp_race, |
185 params.quic_max_server_configs_stored_in_properties, | 184 params.quic_max_server_configs_stored_in_properties, |
186 params.quic_close_sessions_on_ip_change, | 185 params.quic_close_sessions_on_ip_change, |
187 params.disable_quic_on_timeout_with_open_streams, | 186 params.disable_quic_on_timeout_with_open_streams, |
188 params.quic_idle_connection_timeout_seconds, | 187 params.quic_idle_connection_timeout_seconds, |
189 params.quic_migrate_sessions_on_network_change, | 188 params.quic_migrate_sessions_on_network_change, |
190 params.quic_migrate_sessions_early, | 189 params.quic_migrate_sessions_early, |
191 params.quic_force_hol_blocking, | 190 params.quic_force_hol_blocking, |
192 params.quic_race_cert_verification, | |
193 params.quic_connection_options, | 191 params.quic_connection_options, |
194 params.enable_token_binding), | 192 params.enable_token_binding), |
195 spdy_session_pool_(params.host_resolver, | 193 spdy_session_pool_(params.host_resolver, |
196 params.ssl_config_service, | 194 params.ssl_config_service, |
197 params.http_server_properties, | 195 params.http_server_properties, |
198 params.transport_security_state, | 196 params.transport_security_state, |
199 params.enable_spdy_ping_based_connection_checking, | 197 params.enable_spdy_ping_based_connection_checking, |
200 params.enable_priority_dependencies, | 198 params.enable_priority_dependencies, |
201 params.spdy_default_protocol, | 199 params.spdy_default_protocol, |
202 params.spdy_session_max_recv_window_size, | 200 params.spdy_session_max_recv_window_size, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 params_.quic_max_server_configs_stored_in_properties); | 333 params_.quic_max_server_configs_stored_in_properties); |
336 dict->SetInteger("idle_connection_timeout_seconds", | 334 dict->SetInteger("idle_connection_timeout_seconds", |
337 params_.quic_idle_connection_timeout_seconds); | 335 params_.quic_idle_connection_timeout_seconds); |
338 dict->SetBoolean("disable_preconnect_if_0rtt", | 336 dict->SetBoolean("disable_preconnect_if_0rtt", |
339 params_.quic_disable_preconnect_if_0rtt); | 337 params_.quic_disable_preconnect_if_0rtt); |
340 dict->SetBoolean("disable_quic_on_timeout_with_open_streams", | 338 dict->SetBoolean("disable_quic_on_timeout_with_open_streams", |
341 params_.disable_quic_on_timeout_with_open_streams); | 339 params_.disable_quic_on_timeout_with_open_streams); |
342 dict->SetString("disabled_reason", | 340 dict->SetString("disabled_reason", |
343 quic_stream_factory_.QuicDisabledReasonString()); | 341 quic_stream_factory_.QuicDisabledReasonString()); |
344 dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); | 342 dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); |
345 dict->SetBoolean("race_cert_verification", | |
346 params_.quic_race_cert_verification); | |
347 return std::move(dict); | 343 return std::move(dict); |
348 } | 344 } |
349 | 345 |
350 void HttpNetworkSession::CloseAllConnections() { | 346 void HttpNetworkSession::CloseAllConnections() { |
351 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 347 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
352 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 348 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
353 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); | 349 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); |
354 quic_stream_factory_.CloseAllSessions(ERR_ABORTED, QUIC_INTERNAL_ERROR); | 350 quic_stream_factory_.CloseAllSessions(ERR_ABORTED, QUIC_INTERNAL_ERROR); |
355 } | 351 } |
356 | 352 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 case WEBSOCKET_SOCKET_POOL: | 396 case WEBSOCKET_SOCKET_POOL: |
401 return websocket_socket_pool_manager_.get(); | 397 return websocket_socket_pool_manager_.get(); |
402 default: | 398 default: |
403 NOTREACHED(); | 399 NOTREACHED(); |
404 break; | 400 break; |
405 } | 401 } |
406 return NULL; | 402 return NULL; |
407 } | 403 } |
408 | 404 |
409 } // namespace net | 405 } // namespace net |
OLD | NEW |