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

Unified Diff: net/http/http_server_properties.cc

Issue 2362233002: Remove HttpNetworkSession::enabled_protocols_. (Closed)
Patch Set: Created 4 years, 3 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
« net/http/http_server_properties.h ('K') | « net/http/http_server_properties.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties.cc
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc
index 15ac887ef47f75aa0247e304c2956db75f4e1b11..61a3901c5b7da12e7b16093d5e6e2b31dd51b440 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -26,8 +26,16 @@ void HistogramBrokenAlternateProtocolLocation(
}
bool IsAlternateProtocolValid(AlternateProtocol protocol) {
- return protocol >= ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION &&
- protocol <= ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION;
+ switch (protocol) {
+ case NPN_HTTP_2:
+ return true;
+ case QUIC:
+ return true;
+ case UNINITIALIZED_ALTERNATE_PROTOCOL:
+ return false;
+ }
+ NOTREACHED();
+ return false;
}
const char* AlternateProtocolToString(AlternateProtocol protocol) {
« net/http/http_server_properties.h ('K') | « net/http/http_server_properties.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698