| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 quic_threshold_public_resets_post_handshake(0), | 121 quic_threshold_public_resets_post_handshake(0), |
| 122 quic_threshold_timeouts_streams_open(0), | 122 quic_threshold_timeouts_streams_open(0), |
| 123 quic_close_sessions_on_ip_change(false), | 123 quic_close_sessions_on_ip_change(false), |
| 124 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), | 124 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), |
| 125 quic_disable_preconnect_if_0rtt(false), | 125 quic_disable_preconnect_if_0rtt(false), |
| 126 quic_migrate_sessions_on_network_change(false), | 126 quic_migrate_sessions_on_network_change(false), |
| 127 quic_migrate_sessions_early(false), | 127 quic_migrate_sessions_early(false), |
| 128 quic_allow_server_migration(false), | 128 quic_allow_server_migration(false), |
| 129 quic_disable_bidirectional_streams(false), | 129 quic_disable_bidirectional_streams(false), |
| 130 quic_force_hol_blocking(false), | 130 quic_force_hol_blocking(false), |
| 131 quic_race_cert_verification(false), | |
| 132 proxy_delegate(NULL), | 131 proxy_delegate(NULL), |
| 133 enable_token_binding(false) { | 132 enable_token_binding(false) { |
| 134 quic_supported_versions.push_back(QUIC_VERSION_34); | 133 quic_supported_versions.push_back(QUIC_VERSION_34); |
| 135 } | 134 } |
| 136 | 135 |
| 137 HttpNetworkSession::Params::Params(const Params& other) = default; | 136 HttpNetworkSession::Params::Params(const Params& other) = default; |
| 138 | 137 |
| 139 HttpNetworkSession::Params::~Params() {} | 138 HttpNetworkSession::Params::~Params() {} |
| 140 | 139 |
| 141 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. | 140 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 params.quic_socket_receive_buffer_size, | 181 params.quic_socket_receive_buffer_size, |
| 183 params.quic_delay_tcp_race, | 182 params.quic_delay_tcp_race, |
| 184 params.quic_max_server_configs_stored_in_properties, | 183 params.quic_max_server_configs_stored_in_properties, |
| 185 params.quic_close_sessions_on_ip_change, | 184 params.quic_close_sessions_on_ip_change, |
| 186 params.disable_quic_on_timeout_with_open_streams, | 185 params.disable_quic_on_timeout_with_open_streams, |
| 187 params.quic_idle_connection_timeout_seconds, | 186 params.quic_idle_connection_timeout_seconds, |
| 188 params.quic_migrate_sessions_on_network_change, | 187 params.quic_migrate_sessions_on_network_change, |
| 189 params.quic_migrate_sessions_early, | 188 params.quic_migrate_sessions_early, |
| 190 params.quic_allow_server_migration, | 189 params.quic_allow_server_migration, |
| 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.spdy_session_max_recv_window_size, | 198 params.spdy_session_max_recv_window_size, |
| 201 params.spdy_stream_max_recv_window_size, | 199 params.spdy_stream_max_recv_window_size, |
| 202 params.time_func, | 200 params.time_func, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 params_.quic_max_server_configs_stored_in_properties); | 334 params_.quic_max_server_configs_stored_in_properties); |
| 337 dict->SetInteger("idle_connection_timeout_seconds", | 335 dict->SetInteger("idle_connection_timeout_seconds", |
| 338 params_.quic_idle_connection_timeout_seconds); | 336 params_.quic_idle_connection_timeout_seconds); |
| 339 dict->SetBoolean("disable_preconnect_if_0rtt", | 337 dict->SetBoolean("disable_preconnect_if_0rtt", |
| 340 params_.quic_disable_preconnect_if_0rtt); | 338 params_.quic_disable_preconnect_if_0rtt); |
| 341 dict->SetBoolean("disable_quic_on_timeout_with_open_streams", | 339 dict->SetBoolean("disable_quic_on_timeout_with_open_streams", |
| 342 params_.disable_quic_on_timeout_with_open_streams); | 340 params_.disable_quic_on_timeout_with_open_streams); |
| 343 dict->SetString("disabled_reason", | 341 dict->SetString("disabled_reason", |
| 344 quic_stream_factory_.QuicDisabledReasonString()); | 342 quic_stream_factory_.QuicDisabledReasonString()); |
| 345 dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); | 343 dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); |
| 346 dict->SetBoolean("race_cert_verification", | |
| 347 params_.quic_race_cert_verification); | |
| 348 return std::move(dict); | 344 return std::move(dict); |
| 349 } | 345 } |
| 350 | 346 |
| 351 void HttpNetworkSession::CloseAllConnections() { | 347 void HttpNetworkSession::CloseAllConnections() { |
| 352 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 348 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
| 353 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 349 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
| 354 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); | 350 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); |
| 355 quic_stream_factory_.CloseAllSessions(ERR_ABORTED, QUIC_INTERNAL_ERROR); | 351 quic_stream_factory_.CloseAllSessions(ERR_ABORTED, QUIC_INTERNAL_ERROR); |
| 356 } | 352 } |
| 357 | 353 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE: | 405 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE: |
| 410 break; | 406 break; |
| 411 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE: | 407 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE: |
| 412 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL: | 408 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL: |
| 413 CloseIdleConnections(); | 409 CloseIdleConnections(); |
| 414 break; | 410 break; |
| 415 } | 411 } |
| 416 } | 412 } |
| 417 | 413 |
| 418 } // namespace net | 414 } // namespace net |
| OLD | NEW |