| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 QuicCryptoClientStreamFactory::GetDefaultFactory()), | 123 QuicCryptoClientStreamFactory::GetDefaultFactory()), |
| 124 quic_max_recent_disabled_reasons(kQuicMaxRecentDisabledReasons), | 124 quic_max_recent_disabled_reasons(kQuicMaxRecentDisabledReasons), |
| 125 quic_threshold_public_resets_post_handshake(0), | 125 quic_threshold_public_resets_post_handshake(0), |
| 126 quic_threshold_timeouts_streams_open(0), | 126 quic_threshold_timeouts_streams_open(0), |
| 127 quic_close_sessions_on_ip_change(false), | 127 quic_close_sessions_on_ip_change(false), |
| 128 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), | 128 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), |
| 129 quic_disable_preconnect_if_0rtt(false), | 129 quic_disable_preconnect_if_0rtt(false), |
| 130 quic_migrate_sessions_on_network_change(false), | 130 quic_migrate_sessions_on_network_change(false), |
| 131 quic_migrate_sessions_early(false), | 131 quic_migrate_sessions_early(false), |
| 132 quic_disable_bidirectional_streams(false), | 132 quic_disable_bidirectional_streams(false), |
| 133 quic_race_cert_verification(false), |
| 133 proxy_delegate(NULL), | 134 proxy_delegate(NULL), |
| 134 enable_token_binding(false) { | 135 enable_token_binding(false) { |
| 135 quic_supported_versions.push_back(QUIC_VERSION_34); | 136 quic_supported_versions.push_back(QUIC_VERSION_34); |
| 136 } | 137 } |
| 137 | 138 |
| 138 HttpNetworkSession::Params::Params(const Params& other) = default; | 139 HttpNetworkSession::Params::Params(const Params& other) = default; |
| 139 | 140 |
| 140 HttpNetworkSession::Params::~Params() {} | 141 HttpNetworkSession::Params::~Params() {} |
| 141 | 142 |
| 142 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. | 143 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 params.quic_threshold_public_resets_post_handshake, | 182 params.quic_threshold_public_resets_post_handshake, |
| 182 params.quic_threshold_timeouts_streams_open, | 183 params.quic_threshold_timeouts_streams_open, |
| 183 params.quic_socket_receive_buffer_size, | 184 params.quic_socket_receive_buffer_size, |
| 184 params.quic_delay_tcp_race, | 185 params.quic_delay_tcp_race, |
| 185 params.quic_max_server_configs_stored_in_properties, | 186 params.quic_max_server_configs_stored_in_properties, |
| 186 params.quic_close_sessions_on_ip_change, | 187 params.quic_close_sessions_on_ip_change, |
| 187 params.disable_quic_on_timeout_with_open_streams, | 188 params.disable_quic_on_timeout_with_open_streams, |
| 188 params.quic_idle_connection_timeout_seconds, | 189 params.quic_idle_connection_timeout_seconds, |
| 189 params.quic_migrate_sessions_on_network_change, | 190 params.quic_migrate_sessions_on_network_change, |
| 190 params.quic_migrate_sessions_early, | 191 params.quic_migrate_sessions_early, |
| 192 params.quic_race_cert_verification, |
| 191 params.quic_connection_options, | 193 params.quic_connection_options, |
| 192 params.enable_token_binding), | 194 params.enable_token_binding), |
| 193 spdy_session_pool_(params.host_resolver, | 195 spdy_session_pool_(params.host_resolver, |
| 194 params.ssl_config_service, | 196 params.ssl_config_service, |
| 195 params.http_server_properties, | 197 params.http_server_properties, |
| 196 params.transport_security_state, | 198 params.transport_security_state, |
| 197 params.enable_spdy_ping_based_connection_checking, | 199 params.enable_spdy_ping_based_connection_checking, |
| 198 params.enable_priority_dependencies, | 200 params.enable_priority_dependencies, |
| 199 params.spdy_default_protocol, | 201 params.spdy_default_protocol, |
| 200 params.spdy_session_max_recv_window_size, | 202 params.spdy_session_max_recv_window_size, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 dict->SetInteger("max_server_configs_stored_in_properties", | 341 dict->SetInteger("max_server_configs_stored_in_properties", |
| 340 params_.quic_max_server_configs_stored_in_properties); | 342 params_.quic_max_server_configs_stored_in_properties); |
| 341 dict->SetInteger("idle_connection_timeout_seconds", | 343 dict->SetInteger("idle_connection_timeout_seconds", |
| 342 params_.quic_idle_connection_timeout_seconds); | 344 params_.quic_idle_connection_timeout_seconds); |
| 343 dict->SetBoolean("disable_preconnect_if_0rtt", | 345 dict->SetBoolean("disable_preconnect_if_0rtt", |
| 344 params_.quic_disable_preconnect_if_0rtt); | 346 params_.quic_disable_preconnect_if_0rtt); |
| 345 dict->SetBoolean("disable_quic_on_timeout_with_open_streams", | 347 dict->SetBoolean("disable_quic_on_timeout_with_open_streams", |
| 346 params_.disable_quic_on_timeout_with_open_streams); | 348 params_.disable_quic_on_timeout_with_open_streams); |
| 347 dict->SetString("disabled_reason", | 349 dict->SetString("disabled_reason", |
| 348 quic_stream_factory_.QuicDisabledReasonString()); | 350 quic_stream_factory_.QuicDisabledReasonString()); |
| 351 dict->SetBoolean("race_cert_verification", |
| 352 params_.quic_race_cert_verification); |
| 349 return std::move(dict); | 353 return std::move(dict); |
| 350 } | 354 } |
| 351 | 355 |
| 352 void HttpNetworkSession::CloseAllConnections() { | 356 void HttpNetworkSession::CloseAllConnections() { |
| 353 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 357 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
| 354 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 358 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
| 355 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); | 359 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); |
| 356 quic_stream_factory_.CloseAllSessions(ERR_ABORTED, QUIC_INTERNAL_ERROR); | 360 quic_stream_factory_.CloseAllSessions(ERR_ABORTED, QUIC_INTERNAL_ERROR); |
| 357 } | 361 } |
| 358 | 362 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 case WEBSOCKET_SOCKET_POOL: | 410 case WEBSOCKET_SOCKET_POOL: |
| 407 return websocket_socket_pool_manager_.get(); | 411 return websocket_socket_pool_manager_.get(); |
| 408 default: | 412 default: |
| 409 NOTREACHED(); | 413 NOTREACHED(); |
| 410 break; | 414 break; |
| 411 } | 415 } |
| 412 return NULL; | 416 return NULL; |
| 413 } | 417 } |
| 414 | 418 |
| 415 } // namespace net | 419 } // namespace net |
| OLD | NEW |