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

Unified Diff: net/quic/quic_stream_factory.h

Issue 1768593003: When QUIC is disabled because of timeouts with open streams, re-enable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 10 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/http/http_stream_factory_impl_unittest.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.h
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index 919f9ea784f3a86fe6a7ecb8ee791141866dc51c..1986df85369912efa03e314bbaf7242c0033e92a 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -188,8 +188,12 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
bool OnHandshakeConfirmed(QuicChromiumClientSession* session,
float packet_loss_rate);
+ // Called when a TCP job completes for an origin that QUIC potentially
+ // could be used for.
+ void OnTcpJobCompleted(bool succeeded);
+
// Returns true if QUIC is disabled for this port.
- bool IsQuicDisabled(uint16_t port);
+ bool IsQuicDisabled(uint16_t port) const;
// Returns reason QUIC is disabled for this port, or QUIC_DISABLED_NOT if not.
QuicChromiumClientSession::QuicDisabledReason QuicDisabledReason(
@@ -332,6 +336,12 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
typedef std::deque<enum QuicChromiumClientSession::QuicDisabledReason>
DisabledReasonsQueue;
+ enum FactoryStatus {
+ OPEN, // New streams may be created.
+ CLOSED, // No new streams may be created temporarily.
+ DISABLED // No more streams may be created until the network changes.
+ };
+
// 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,
@@ -391,6 +401,8 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
// Collect stats from recent connections, possibly disabling Quic.
void MaybeDisableQuic(QuicChromiumClientSession* session);
+ void MaybeDisableQuic(uint16_t port);
+
bool require_confirmation_;
HostResolver* host_resolver_;
ClientSocketFactory* client_socket_factory_;
@@ -533,6 +545,9 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
QuicClientPushPromiseIndex push_promise_index_;
+ // Current status of the factory's ability to create streams.
+ FactoryStatus status_;
+
base::TaskRunner* task_runner_;
base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698