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

Side by Side Diff: net/quic/quic_stream_factory.cc

Issue 1775283002: [Domain Reliabiliy: net stack] Plumb received go away from server due to connection migration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 transport_security_state, 611 transport_security_state,
612 cert_transparency_verifier)), 612 cert_transparency_verifier)),
613 supported_versions_(supported_versions), 613 supported_versions_(supported_versions),
614 enable_port_selection_(enable_port_selection), 614 enable_port_selection_(enable_port_selection),
615 always_require_handshake_confirmation_( 615 always_require_handshake_confirmation_(
616 always_require_handshake_confirmation), 616 always_require_handshake_confirmation),
617 disable_connection_pooling_(disable_connection_pooling), 617 disable_connection_pooling_(disable_connection_pooling),
618 load_server_info_timeout_srtt_multiplier_( 618 load_server_info_timeout_srtt_multiplier_(
619 load_server_info_timeout_srtt_multiplier), 619 load_server_info_timeout_srtt_multiplier),
620 enable_connection_racing_(enable_connection_racing), 620 enable_connection_racing_(enable_connection_racing),
621 goaway_received_for_connection_mirgation_(false),
621 enable_non_blocking_io_(enable_non_blocking_io), 622 enable_non_blocking_io_(enable_non_blocking_io),
622 disable_disk_cache_(disable_disk_cache), 623 disable_disk_cache_(disable_disk_cache),
623 prefer_aes_(prefer_aes), 624 prefer_aes_(prefer_aes),
624 max_number_of_lossy_connections_(max_number_of_lossy_connections), 625 max_number_of_lossy_connections_(max_number_of_lossy_connections),
625 packet_loss_threshold_(packet_loss_threshold), 626 packet_loss_threshold_(packet_loss_threshold),
626 max_disabled_reasons_(max_disabled_reasons), 627 max_disabled_reasons_(max_disabled_reasons),
627 num_public_resets_post_handshake_(0), 628 num_public_resets_post_handshake_(0),
628 num_timeouts_with_open_streams_(0), 629 num_timeouts_with_open_streams_(0),
629 max_public_resets_post_handshake_(0), 630 max_public_resets_post_handshake_(0),
630 max_timeouts_with_open_streams_(0), 631 max_timeouts_with_open_streams_(0),
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 if (!aliases.empty()) { 1065 if (!aliases.empty()) {
1065 const IPEndPoint peer_address = session->connection()->peer_address(); 1066 const IPEndPoint peer_address = session->connection()->peer_address();
1066 ip_aliases_[peer_address].erase(session); 1067 ip_aliases_[peer_address].erase(session);
1067 if (ip_aliases_[peer_address].empty()) { 1068 if (ip_aliases_[peer_address].empty()) {
1068 ip_aliases_.erase(peer_address); 1069 ip_aliases_.erase(peer_address);
1069 } 1070 }
1070 } 1071 }
1071 session_aliases_.erase(session); 1072 session_aliases_.erase(session);
1072 } 1073 }
1073 1074
1075 void QuicStreamFactory::OnSessionGoingAwayForConnectionMigration() {
1076 goaway_received_for_connection_mirgation_ = true;
1077 }
1078
1074 void QuicStreamFactory::MaybeDisableQuic(QuicChromiumClientSession* session) { 1079 void QuicStreamFactory::MaybeDisableQuic(QuicChromiumClientSession* session) {
1075 DCHECK(session); 1080 DCHECK(session);
1076 uint16_t port = session->server_id().port(); 1081 uint16_t port = session->server_id().port();
1077 if (IsQuicDisabled(port)) 1082 if (IsQuicDisabled(port))
1078 return; 1083 return;
1079 1084
1080 // Expire the oldest disabled_reason if appropriate. This enforces that we 1085 // Expire the oldest disabled_reason if appropriate. This enforces that we
1081 // only consider the max_disabled_reasons_ most recent sessions. 1086 // only consider the max_disabled_reasons_ most recent sessions.
1082 QuicChromiumClientSession::QuicDisabledReason disabled_reason; 1087 QuicChromiumClientSession::QuicDisabledReason disabled_reason;
1083 if (static_cast<int>(disabled_reasons_.size()) == max_disabled_reasons_) { 1088 if (static_cast<int>(disabled_reasons_.size()) == max_disabled_reasons_) {
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 1690
1686 // Since the session was active, there's no longer an 1691 // Since the session was active, there's no longer an
1687 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 1692 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
1688 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 1693 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
1689 // it as recently broken, which means that 0-RTT will be disabled but we'll 1694 // it as recently broken, which means that 0-RTT will be disabled but we'll
1690 // still race. 1695 // still race.
1691 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 1696 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
1692 alternative_service); 1697 alternative_service);
1693 } 1698 }
1694 1699
1700 void QuicStreamFactory::PopulateNetErrorDetails(NetErrorDetails* details) {
1701 details->goaway_received_for_connection_mirgation =
1702 goaway_received_for_connection_mirgation_;
Ryan Hamilton 2016/03/09 19:53:03 I don't understand how this works. The HttpNetwork
1703 }
1704
1695 } // namespace net 1705 } // namespace net
OLDNEW
« net/quic/quic_chromium_client_session.cc ('K') | « net/quic/quic_stream_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698