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

Unified Diff: net/quic/quic_stream_factory.h

Issue 1025573002: QUIC - disable QUIC if packet loss rate is bad for a connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: net/quic/quic_stream_factory.h
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index 6446e11356f6b964c3c0c3970bbf01583e1323fc..288685caea4bfb888439ab4d269325cc34051fef 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -108,6 +108,8 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
bool enable_connection_racing,
bool enable_non_blocking_io,
bool disable_disk_cache,
+ int number_of_lossy_handshakes,
+ int packet_loss_threshold,
int socket_receive_buffer_size,
const QuicTagVector& connection_options);
~QuicStreamFactory() override;
@@ -124,6 +126,14 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
const BoundNetLog& net_log,
QuicStreamRequest* request);
+ // Called by a session when crypto handshake is either confirmed or timedout.
+ // Returns QUIC_NO_ERROR if there is no high packet loss. If there is a bad
+ // packet loss rate, mark QUIC as recently broken for the given |server_id|,
+ // closes the connection and returns QUIC_BAD_PACKET_LOSS_RATE.
+ QuicErrorCode OnCryptoHandshakeCompleted(QuicClientSession* session,
+ const QuicServerId& server_id,
+ int number_of_handshakes);
+
// Called by a session when it becomes idle.
void OnIdleSession(QuicClientSession* session);
@@ -327,6 +337,13 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
// Set if we do not want to load server config from the disk cache.
bool disable_disk_cache_;
+ // Set if we want to disable QUIC for a connection if packet loss rate is bad.
+ int number_of_lossy_handshakes_;
+ int packet_loss_threshold_;
+
+ // Set if we do not want to use 0-RTT (not use server config from cache).
+ bool disable_zero_rtt_;
+
// Size of the UDP receive buffer.
int socket_receive_buffer_size_;

Powered by Google App Engine
This is Rietveld 408576698