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

Unified Diff: net/quic/quic_server_session.cc

Issue 351133002: Adds an internal server and chromium's flag for disabling/enabling FEC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_server_session.h ('k') | net/quic/quic_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_server_session.cc
diff --git a/net/quic/quic_server_session.cc b/net/quic/quic_server_session.cc
index 1de91a44aa1ec10da4a1aadba11cbdcfc9396d79..b9acb2239558f17559227cf0576a71eec6d9f8de 100644
--- a/net/quic/quic_server_session.cc
+++ b/net/quic/quic_server_session.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "net/quic/quic_connection.h"
+#include "net/quic/quic_flags.h"
#include "net/quic/quic_spdy_server_stream.h"
#include "net/quic/reliable_quic_stream.h"
@@ -29,6 +30,18 @@ QuicCryptoServerStream* QuicServerSession::CreateQuicCryptoServerStream(
return new QuicCryptoServerStream(crypto_config, this);
}
+void QuicServerSession::OnConfigNegotiated() {
+ QuicSession::OnConfigNegotiated();
+ if (!FLAGS_enable_quic_fec ||
+ !config()->HasReceivedConnectionOptions() ||
+ !ContainsQuicTag(config()->ReceivedConnectionOptions(), kFHDR)) {
+ return;
+ }
+ // kFHDR config maps to FEC protection always for headers stream.
+ // TODO(jri): Add crypto stream in addition to headers for kHDR.
+ headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS);
+}
+
void QuicServerSession::OnConnectionClosed(QuicErrorCode error,
bool from_peer) {
QuicSession::OnConnectionClosed(error, from_peer);
« no previous file with comments | « net/quic/quic_server_session.h ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698