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

Unified Diff: net/http/http_server_properties.cc

Issue 987123002: Advertise HTTP/2 support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/http/http_server_properties.h ('k') | net/http/http_stream_factory_impl_request_unittest.cc » ('j') | 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 6b5f226cad0b185d3de64a58b61b024ad2456103..514ef4f94f2c0e1368217212cdc9cb4f79007926 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -19,13 +19,13 @@ namespace {
// The order of these strings much match the order of the enum definition
// for AlternateProtocol.
const char* const kAlternateProtocolStrings[] = {
- "npn-spdy/2",
- "npn-spdy/3",
- "npn-spdy/3.1",
- "npn-h2-14", // HTTP/2 draft-14. Called SPDY4 internally.
- "npn-h2-15", // HTTP/2 draft-15. Called SPDY4 internally.
- "quic"
-};
+ "npn-spdy/2",
+ "npn-spdy/3",
+ "npn-spdy/3.1",
+ "npn-h2-14", // HTTP/2 draft-14. Called SPDY4 internally.
+ "npn-h2-15", // HTTP/2 draft-15. Called SPDY4 internally.
+ "npn-h2",
+ "quic"};
static_assert(arraysize(kAlternateProtocolStrings) ==
NUM_VALID_ALTERNATE_PROTOCOLS,
@@ -56,6 +56,7 @@ const char* AlternateProtocolToString(AlternateProtocol protocol) {
case NPN_SPDY_3_1:
case NPN_SPDY_4_14:
case NPN_SPDY_4_15:
+ case NPN_SPDY_4:
case QUIC:
DCHECK(IsAlternateProtocolValid(protocol));
return kAlternateProtocolStrings[
@@ -89,6 +90,8 @@ AlternateProtocol AlternateProtocolFromNextProto(NextProto next_proto) {
return NPN_SPDY_4_14;
case kProtoSPDY4_15:
return NPN_SPDY_4_15;
+ case kProtoSPDY4:
+ return NPN_SPDY_4;
case kProtoQUIC1SPDY3:
return QUIC;
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_stream_factory_impl_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698