Chromium Code Reviews| Index: net/quic/quic_stream_factory.h |
| diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h |
| index 80ce889d379372310508c59703fa46e08f86ad8a..f6d5ce8abd3e5d61f8a4ef3a7baec503b9ffb249 100644 |
| --- a/net/quic/quic_stream_factory.h |
| +++ b/net/quic/quic_stream_factory.h |
| @@ -42,6 +42,8 @@ class QuicServerId; |
| class QuicStreamFactory; |
| class TransportSecurityState; |
| +enum QuicClientSessionEpitaph; |
| + |
| namespace test { |
| class QuicStreamFactoryPeer; |
| } // namespace test |
| @@ -121,6 +123,9 @@ class NET_EXPORT_PRIVATE QuicStreamFactory |
| bool prefer_aes, |
| int max_number_of_lossy_connections, |
| float packet_loss_threshold, |
| + int max_epitaphs, |
| + int threshold_timeouts_streams_open, |
| + int threshold_public_resets_post_handshake, |
| int socket_receive_buffer_size, |
| const QuicTagVector& connection_options); |
| ~QuicStreamFactory() override; |
| @@ -151,6 +156,9 @@ class NET_EXPORT_PRIVATE QuicStreamFactory |
| // Returns true if QUIC is disabled for this port. |
| bool IsQuicDisabled(uint16 port); |
| + // Returns reason QUIC is disabled for this port, or QUIC_NO_ERROR if not. |
| + QuicErrorCode QuicDisabledReason(uint16 port); |
|
Ryan Hamilton
2015/06/30 18:55:32
Instead of QuicErrorCodes (which intended as on-th
Buck
2015/07/01 19:06:20
I went with QuicDisabledReason in quic_types.h
|
| + |
| // Called by a session when it becomes idle. |
| void OnIdleSession(QuicClientSession* session); |
| @@ -244,6 +252,8 @@ class NET_EXPORT_PRIVATE QuicStreamFactory |
| typedef std::set<QuicStreamRequest*> RequestSet; |
| typedef std::map<QuicServerId, RequestSet> ServerIDRequestsMap; |
| + typedef std::deque<QuicClientSessionEpitaph> EpitaphsQueue; |
|
Ryan Hamilton
2015/06/30 18:55:32
nit: remove the newline before to be consistent wi
Buck
2015/07/01 19:06:20
Done.
|
| + |
| // Creates a job which doesn't wait for server config to be loaded from the |
| // disk cache. This job is started via a PostTask. |
| void CreateAuxilaryJob(const QuicServerId server_id, |
| @@ -290,6 +300,9 @@ class NET_EXPORT_PRIVATE QuicStreamFactory |
| const QuicServerId& server_id, |
| bool was_session_active); |
| + // Collect stats from epitaphs, possibly disabling Quic. |
| + void MaybeDisableQuic(QuicClientSession* session); |
| + |
| bool require_confirmation_; |
| HostResolver* host_resolver_; |
| ClientSocketFactory* client_socket_factory_; |
| @@ -368,6 +381,21 @@ class NET_EXPORT_PRIVATE QuicStreamFactory |
| // Count number of lossy connections by port. |
| std::map<uint16, int> number_of_lossy_connections_; |
| + // Keep track of stats for recently departed connections, using a |
|
Ryan Hamilton
2015/06/30 18:55:32
nit: instead of "departed", how about "closed" whi
Buck
2015/07/01 19:06:20
Done.
|
| + // bounded queue. |
| + int max_epitaphs_; |
| + EpitaphsQueue epitaphs_; |
| + // Events that can trigger disaabling QUIC |
|
Ryan Hamilton
2015/06/30 18:55:32
nit: disaabling -> disabling
Buck
2015/07/01 19:06:19
Done.
|
| + int public_resets_post_handshake_; |
|
Ryan Hamilton
2015/06/30 18:55:32
nit: num_public_resets_post_handshake_ and num_tim
Buck
2015/07/01 19:06:20
Done.
|
| + int timeouts_streams_open_; |
| + // Keep track the largest values for UMA histograms, that will help |
| + // determine good threshold values. |
| + int max_public_resets_post_handshake_; |
| + int max_timeouts_streams_open_; |
| + // Thresholds if greater than zero, determine when to |
| + int threshold_timeouts_streams_open_; |
| + int threshold_public_resets_post_handshake_; |
| + |
| // Size of the UDP receive buffer. |
| int socket_receive_buffer_size_; |