Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: net/http/http_network_session.cc

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Rebase. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_network_session.h ('k') | net/quic/quic_chromium_client_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 quic_max_packet_length(kDefaultMaxPacketSize), 120 quic_max_packet_length(kDefaultMaxPacketSize),
121 enable_user_alternate_protocol_ports(false), 121 enable_user_alternate_protocol_ports(false),
122 quic_crypto_client_stream_factory( 122 quic_crypto_client_stream_factory(
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 proxy_delegate(NULL) { 131 proxy_delegate(NULL) {
131 quic_supported_versions.push_back(QUIC_VERSION_25); 132 quic_supported_versions.push_back(QUIC_VERSION_25);
132 } 133 }
133 134
134 HttpNetworkSession::Params::~Params() {} 135 HttpNetworkSession::Params::~Params() {}
135 136
136 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. 137 // TODO(mbelshe): Move the socket factories into HttpStreamFactory.
137 HttpNetworkSession::HttpNetworkSession(const Params& params) 138 HttpNetworkSession::HttpNetworkSession(const Params& params)
138 : net_log_(params.net_log), 139 : net_log_(params.net_log),
139 network_delegate_(params.network_delegate), 140 network_delegate_(params.network_delegate),
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 params.quic_max_number_of_lossy_connections, 172 params.quic_max_number_of_lossy_connections,
172 params.quic_packet_loss_threshold, 173 params.quic_packet_loss_threshold,
173 params.quic_max_recent_disabled_reasons, 174 params.quic_max_recent_disabled_reasons,
174 params.quic_threshold_public_resets_post_handshake, 175 params.quic_threshold_public_resets_post_handshake,
175 params.quic_threshold_timeouts_streams_open, 176 params.quic_threshold_timeouts_streams_open,
176 params.quic_socket_receive_buffer_size, 177 params.quic_socket_receive_buffer_size,
177 params.quic_delay_tcp_race, 178 params.quic_delay_tcp_race,
178 params.quic_store_server_configs_in_properties, 179 params.quic_store_server_configs_in_properties,
179 params.quic_close_sessions_on_ip_change, 180 params.quic_close_sessions_on_ip_change,
180 params.quic_idle_connection_timeout_seconds, 181 params.quic_idle_connection_timeout_seconds,
182 params.quic_migrate_sessions_on_network_change,
181 params.quic_connection_options), 183 params.quic_connection_options),
182 spdy_session_pool_(params.host_resolver, 184 spdy_session_pool_(params.host_resolver,
183 params.ssl_config_service, 185 params.ssl_config_service,
184 params.http_server_properties, 186 params.http_server_properties,
185 params.transport_security_state, 187 params.transport_security_state,
186 params.enable_spdy_compression, 188 params.enable_spdy_compression,
187 params.enable_spdy_ping_based_connection_checking, 189 params.enable_spdy_ping_based_connection_checking,
188 params.spdy_default_protocol, 190 params.spdy_default_protocol,
189 params.spdy_session_max_recv_window_size, 191 params.spdy_session_max_recv_window_size,
190 params.spdy_stream_max_recv_window_size, 192 params.spdy_stream_max_recv_window_size,
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 params_.quic_disable_preconnect_if_0rtt); 332 params_.quic_disable_preconnect_if_0rtt);
331 dict->SetString("disabled_reason", 333 dict->SetString("disabled_reason",
332 quic_stream_factory_.QuicDisabledReasonString()); 334 quic_stream_factory_.QuicDisabledReasonString());
333 return std::move(dict); 335 return std::move(dict);
334 } 336 }
335 337
336 void HttpNetworkSession::CloseAllConnections() { 338 void HttpNetworkSession::CloseAllConnections() {
337 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); 339 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED);
338 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); 340 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED);
339 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); 341 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED);
340 quic_stream_factory_.CloseAllSessions(ERR_ABORTED); 342 quic_stream_factory_.CloseAllSessions(ERR_ABORTED, QUIC_INTERNAL_ERROR);
341 } 343 }
342 344
343 void HttpNetworkSession::CloseIdleConnections() { 345 void HttpNetworkSession::CloseIdleConnections() {
344 normal_socket_pool_manager_->CloseIdleSockets(); 346 normal_socket_pool_manager_->CloseIdleSockets();
345 websocket_socket_pool_manager_->CloseIdleSockets(); 347 websocket_socket_pool_manager_->CloseIdleSockets();
346 spdy_session_pool_.CloseCurrentIdleSessions(); 348 spdy_session_pool_.CloseCurrentIdleSessions();
347 } 349 }
348 350
349 bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const { 351 bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const {
350 DCHECK(IsAlternateProtocolValid(protocol)); 352 DCHECK(IsAlternateProtocolValid(protocol));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 case WEBSOCKET_SOCKET_POOL: 384 case WEBSOCKET_SOCKET_POOL:
383 return websocket_socket_pool_manager_.get(); 385 return websocket_socket_pool_manager_.get();
384 default: 386 default:
385 NOTREACHED(); 387 NOTREACHED();
386 break; 388 break;
387 } 389 }
388 return NULL; 390 return NULL;
389 } 391 }
390 392
391 } // namespace net 393 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/quic/quic_chromium_client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698