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

Unified Diff: net/http/http_network_session.cc

Issue 2496953002: Revert of Unify enum NextProto and enum AlternateProtocol. (Closed)
Patch Set: Created 4 years, 1 month 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.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 679c24a1572ec074ed32a6b0c8230af4fb750263..d5cca863a15785d22bf8155b71b96f2eb6f5f62a 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -347,17 +347,15 @@
spdy_session_pool_.CloseCurrentIdleSessions();
}
-bool HttpNetworkSession::IsProtocolEnabled(NextProto protocol) const {
+bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const {
switch (protocol) {
- case kProtoUnknown:
+ case NPN_HTTP_2:
+ return params_.enable_http2;
+ case QUIC:
+ return params_.enable_quic;
+ case UNINITIALIZED_ALTERNATE_PROTOCOL:
NOTREACHED();
return false;
- case kProtoHTTP11:
- return true;
- case kProtoHTTP2:
- return params_.enable_http2;
- case kProtoQUIC:
- return params_.enable_quic;
}
NOTREACHED();
return false;
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698