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

Unified Diff: net/http/http_network_session.cc

Issue 2373663002: Unify enum NextProto and enum AlternateProtocol. (Closed)
Patch Set: Fix compile errors. 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 d5cca863a15785d22bf8155b71b96f2eb6f5f62a..679c24a1572ec074ed32a6b0c8230af4fb750263 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -347,15 +347,17 @@ void HttpNetworkSession::CloseIdleConnections() {
spdy_session_pool_.CloseCurrentIdleSessions();
}
-bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const {
+bool HttpNetworkSession::IsProtocolEnabled(NextProto protocol) const {
switch (protocol) {
- case NPN_HTTP_2:
- return params_.enable_http2;
- case QUIC:
- return params_.enable_quic;
- case UNINITIALIZED_ALTERNATE_PROTOCOL:
+ case kProtoUnknown:
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