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

Unified Diff: net/quic/quic_client_session.h

Issue 1208933004: QUIC - disable QUIC under recent pathological connection errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revised after fourth round of review feedback. Created 5 years, 5 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_network_session.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_session.h
diff --git a/net/quic/quic_client_session.h b/net/quic/quic_client_session.h
index 414b9069b105cbdfdbbf5f2927d9857475d2f1f1..ae55a18ede43d4d98b924839d9fc60dc61b839ca 100644
--- a/net/quic/quic_client_session.h
+++ b/net/quic/quic_client_session.h
@@ -44,6 +44,18 @@ class QuicClientSessionPeer;
class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase,
public QuicPacketReader::Visitor {
public:
+ // Reasons to disable QUIC, that is under certain pathological
+ // connection errors. Note: these values must be kept in sync with
+ // the corresponding values of QuicDisabledReason in:
+ // tools/metrics/histograms/histograms.xml
+ enum QuicDisabledReason {
+ QUIC_DISABLED_NOT = 0, // default, not disabled
+ QUIC_DISABLED_PUBLIC_RESET_POST_HANDSHAKE = 1,
+ QUIC_DISABLED_TIMEOUT_WITH_OPEN_STREAMS = 2,
+ QUIC_DISABLED_BAD_PACKET_LOSS_RATE = 3,
+ QUIC_DISABLED_MAX = 4,
+ };
+
// An interface for observing events on a session.
class NET_EXPORT_PRIVATE Observer {
public:
@@ -194,6 +206,8 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase,
const QuicServerId& server_id() const { return server_id_; }
+ QuicDisabledReason disabled_reason() const { return disabled_reason_; }
+
protected:
// QuicSession methods:
QuicDataStream* CreateIncomingDynamicStream(QuicStreamId id) override;
@@ -261,6 +275,7 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase,
// True when the session is going away, and streams may no longer be created
// on this session. Existing stream will continue to be processed.
bool going_away_;
+ QuicDisabledReason disabled_reason_;
base::WeakPtrFactory<QuicClientSession> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698