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

Unified Diff: net/quic/quic_chromium_client_session.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: remove conditional assignment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_chromium_client_session.h ('k') | net/quic/quic_http_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_chromium_client_session.cc
diff --git a/net/quic/quic_chromium_client_session.cc b/net/quic/quic_chromium_client_session.cc
index 15ec708d5f4c8df66dd85ad4db6eea3e37c19fc4..85d06aec406b6a5426425d2d21159c7d99417a5c 100644
--- a/net/quic/quic_chromium_client_session.cc
+++ b/net/quic/quic_chromium_client_session.cc
@@ -205,6 +205,7 @@ QuicChromiumClientSession::QuicChromiumClientSession(
std::move(socket_performance_watcher),
net_log_)),
going_away_(false),
+ port_migration_detected_(false),
disabled_reason_(QUIC_DISABLED_NOT),
token_binding_signatures_(kTokenBindingSignatureMapSize),
weak_factory_(this) {
@@ -370,7 +371,7 @@ void QuicChromiumClientSession::OnStreamFrame(const QuicStreamFrame& frame) {
void QuicChromiumClientSession::AddObserver(Observer* observer) {
if (going_away_) {
RecordUnexpectedObservers(ADD_OBSERVER);
- observer->OnSessionClosed(ERR_UNEXPECTED);
+ observer->OnSessionClosed(ERR_UNEXPECTED, port_migration_detected_);
return;
}
@@ -760,6 +761,7 @@ void QuicChromiumClientSession::OnCryptoHandshakeMessageReceived(
void QuicChromiumClientSession::OnGoAway(const QuicGoAwayFrame& frame) {
QuicSession::OnGoAway(frame);
NotifyFactoryOfSessionGoingAway();
+ port_migration_detected_ = frame.error_code == QUIC_ERROR_MIGRATING_PORT;
}
void QuicChromiumClientSession::OnRstStream(const QuicRstStreamFrame& frame) {
@@ -961,7 +963,7 @@ void QuicChromiumClientSession::CloseAllObservers(int net_error) {
while (!observers_.empty()) {
Observer* observer = *observers_.begin();
observers_.erase(observer);
- observer->OnSessionClosed(net_error);
+ observer->OnSessionClosed(net_error, port_migration_detected_);
}
}
@@ -1098,6 +1100,11 @@ bool QuicChromiumClientSession::MigrateToSocket(
return true;
}
+void QuicChromiumClientSession::PopulateNetErrorDetails(
+ NetErrorDetails* details) {
+ details->quic_port_migration_detected = port_migration_detected_;
+}
+
const DatagramClientSocket* QuicChromiumClientSession::GetDefaultSocket()
const {
DCHECK(sockets_.back().get() != nullptr);
« no previous file with comments | « net/quic/quic_chromium_client_session.h ('k') | net/quic/quic_http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698