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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 293063013: Now that the HttpStreamFactoryImpl::Job is not marking Alternate-Protocol (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better test Created 6 years, 7 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_stream_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 8d016ef1cf9c8aa64ec7210bbd1c3980a73bb79e..7e1c244b1ec035c75219e1f02dde0eed0a63e4fa 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -582,9 +582,9 @@ void QuicStreamFactory::OnSessionGoingAway(QuicClientSession* session) {
}
active_sessions_.erase(*it);
- ProcessGoingAwaySession(session, *it);
+ ProcessGoingAwaySession(session, *it, true);
}
- ProcessGoingAwaySession(session, all_sessions_[session]);
+ ProcessGoingAwaySession(session, all_sessions_[session], false);
if (!aliases.empty()) {
const IpAliasKey ip_alias_key(session->connection()->peer_address(),
aliases.begin()->is_https());
@@ -816,12 +816,24 @@ void QuicStreamFactory::InitializeCachedStateInCryptoConfig(
void QuicStreamFactory::ProcessGoingAwaySession(
QuicClientSession* session,
- const QuicServerId& server_id) {
+ const QuicServerId& server_id,
+ bool session_was_active) {
if (!http_server_properties_)
return;
const QuicConnectionStats& stats = session->connection()->GetStats();
- if (!session->IsCryptoHandshakeConfirmed()) {
+ if (session->IsCryptoHandshakeConfirmed()) {
+ HttpServerProperties::NetworkStats network_stats;
+ network_stats.srtt = base::TimeDelta::FromMicroseconds(stats.srtt_us);
+ network_stats.bandwidth_estimate = stats.estimated_bandwidth;
+ http_server_properties_->SetServerNetworkStats(server_id.host_port_pair(),
+ network_stats);
+ }
jar (doing other things) 2014/05/22 21:03:22 nit: return
+
+ UMA_HISTOGRAM_COUNTS("Net.QuicHandshakeNotConfirmedNumPacketsReceived",
+ stats.packets_received);
+
+ if (session_was_active) {
// TODO(rch): In the special case where the session has received no
// packets from the peer, we should consider blacklisting this
// differently so that we still race TCP but we don't consider the
@@ -830,16 +842,7 @@ void QuicStreamFactory::ProcessGoingAwaySession(
BROKEN_ALTERNATE_PROTOCOL_LOCATION_QUIC_STREAM_FACTORY);
http_server_properties_->SetBrokenAlternateProtocol(
server_id.host_port_pair());
- UMA_HISTOGRAM_COUNTS("Net.QuicHandshakeNotConfirmedNumPacketsReceived",
- stats.packets_received);
- return;
}
-
- HttpServerProperties::NetworkStats network_stats;
- network_stats.srtt = base::TimeDelta::FromMicroseconds(stats.srtt_us);
- network_stats.bandwidth_estimate = stats.estimated_bandwidth;
- http_server_properties_->SetServerNetworkStats(server_id.host_port_pair(),
- network_stats);
}
} // namespace net
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698