| 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 <inttypes.h> | 7 #include <inttypes.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 quic_reduced_ping_timeout_seconds(kPingTimeoutSecs), | 135 quic_reduced_ping_timeout_seconds(kPingTimeoutSecs), |
| 136 quic_packet_reader_yield_after_duration_milliseconds( | 136 quic_packet_reader_yield_after_duration_milliseconds( |
| 137 kQuicYieldAfterDurationMilliseconds), | 137 kQuicYieldAfterDurationMilliseconds), |
| 138 quic_migrate_sessions_on_network_change(false), | 138 quic_migrate_sessions_on_network_change(false), |
| 139 quic_migrate_sessions_early(false), | 139 quic_migrate_sessions_early(false), |
| 140 quic_allow_server_migration(false), | 140 quic_allow_server_migration(false), |
| 141 quic_disable_bidirectional_streams(false), | 141 quic_disable_bidirectional_streams(false), |
| 142 quic_force_hol_blocking(false), | 142 quic_force_hol_blocking(false), |
| 143 quic_race_cert_verification(false), | 143 quic_race_cert_verification(false), |
| 144 quic_do_not_fragment(false), | 144 quic_do_not_fragment(false), |
| 145 quic_do_not_mark_as_broken_on_network_change(false), | |
| 146 quic_estimate_initial_rtt(false), | 145 quic_estimate_initial_rtt(false), |
| 147 proxy_delegate(nullptr), | 146 proxy_delegate(nullptr), |
| 148 enable_token_binding(false), | 147 enable_token_binding(false), |
| 149 http_09_on_non_default_ports_enabled(false) { | 148 http_09_on_non_default_ports_enabled(false) { |
| 150 quic_supported_versions.push_back(QUIC_VERSION_37); | 149 quic_supported_versions.push_back(QUIC_VERSION_37); |
| 151 } | 150 } |
| 152 | 151 |
| 153 HttpNetworkSession::Params::Params(const Params& other) = default; | 152 HttpNetworkSession::Params::Params(const Params& other) = default; |
| 154 | 153 |
| 155 HttpNetworkSession::Params::~Params() {} | 154 HttpNetworkSession::Params::~Params() {} |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 params_.quic_disable_bidirectional_streams); | 338 params_.quic_disable_bidirectional_streams); |
| 340 dict->SetBoolean("close_sessions_on_ip_change", | 339 dict->SetBoolean("close_sessions_on_ip_change", |
| 341 params_.quic_close_sessions_on_ip_change); | 340 params_.quic_close_sessions_on_ip_change); |
| 342 dict->SetBoolean("migrate_sessions_on_network_change", | 341 dict->SetBoolean("migrate_sessions_on_network_change", |
| 343 params_.quic_migrate_sessions_on_network_change); | 342 params_.quic_migrate_sessions_on_network_change); |
| 344 dict->SetBoolean("migrate_sessions_early", | 343 dict->SetBoolean("migrate_sessions_early", |
| 345 params_.quic_migrate_sessions_early); | 344 params_.quic_migrate_sessions_early); |
| 346 dict->SetBoolean("allow_server_migration", | 345 dict->SetBoolean("allow_server_migration", |
| 347 params_.quic_allow_server_migration); | 346 params_.quic_allow_server_migration); |
| 348 dict->SetBoolean("do_not_fragment", params_.quic_do_not_fragment); | 347 dict->SetBoolean("do_not_fragment", params_.quic_do_not_fragment); |
| 349 dict->SetBoolean("do_not_mark_as_broken_on_network_change", | |
| 350 params_.quic_do_not_mark_as_broken_on_network_change); | |
| 351 dict->SetBoolean("estimate_initial_rtt", params_.quic_estimate_initial_rtt); | 348 dict->SetBoolean("estimate_initial_rtt", params_.quic_estimate_initial_rtt); |
| 352 dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); | 349 dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); |
| 353 | 350 |
| 354 return std::move(dict); | 351 return std::move(dict); |
| 355 } | 352 } |
| 356 | 353 |
| 357 void HttpNetworkSession::CloseAllConnections() { | 354 void HttpNetworkSession::CloseAllConnections() { |
| 358 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 355 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
| 359 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 356 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
| 360 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); | 357 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 CloseIdleConnections(); | 470 CloseIdleConnections(); |
| 474 break; | 471 break; |
| 475 } | 472 } |
| 476 } | 473 } |
| 477 | 474 |
| 478 void HttpNetworkSession::OnPurgeMemory() { | 475 void HttpNetworkSession::OnPurgeMemory() { |
| 479 CloseIdleConnections(); | 476 CloseIdleConnections(); |
| 480 } | 477 } |
| 481 | 478 |
| 482 } // namespace net | 479 } // namespace net |
| OLD | NEW |