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

Unified Diff: net/quic/core/quic_config.cc

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 years 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/core/quic_config.h ('k') | net/quic/core/quic_config_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_config.cc
diff --git a/net/quic/core/quic_config.cc b/net/quic/core/quic_config.cc
index de1c287187f17a593db0450b3e505d5f705e033e..8dc68e96a6952c36268012638f12662fd1735302 100644
--- a/net/quic/core/quic_config.cc
+++ b/net/quic/core/quic_config.cc
@@ -326,6 +326,7 @@ QuicConfig::QuicConfig()
max_idle_time_before_crypto_handshake_(QuicTime::Delta::Zero()),
max_undecryptable_packets_(0),
connection_options_(kCOPT, PRESENCE_OPTIONAL),
+ client_connection_options_(kCLOP, PRESENCE_OPTIONAL),
idle_network_timeout_seconds_(kICSL, PRESENCE_REQUIRED),
silent_close_(kSCLS, PRESENCE_OPTIONAL),
max_streams_per_connection_(kMSPC, PRESENCE_OPTIONAL),
@@ -392,6 +393,23 @@ bool QuicConfig::HasClientSentConnectionOption(QuicTag tag,
return false;
}
+void QuicConfig::SetClientConnectionOptions(
+ const QuicTagVector& client_connection_options) {
+ client_connection_options_.SetSendValues(client_connection_options);
+}
+
+bool QuicConfig::HasClientRequestedIndependentOption(
+ QuicTag tag,
+ Perspective perspective) const {
+ if (perspective == Perspective::IS_SERVER) {
+ return (HasReceivedConnectionOptions() &&
+ ContainsQuicTag(ReceivedConnectionOptions(), tag));
+ }
+
+ return (client_connection_options_.HasSendValues() &&
+ ContainsQuicTag(client_connection_options_.GetSendValues(), tag));
+}
+
void QuicConfig::SetIdleNetworkTimeout(
QuicTime::Delta max_idle_network_timeout,
QuicTime::Delta default_idle_network_timeout) {
« no previous file with comments | « net/quic/core/quic_config.h ('k') | net/quic/core/quic_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698