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

Unified Diff: net/http/http_server_properties.h

Issue 25956002: [SPDY] Remove references to obsolete SPDY versions SPDY/1 and SPDY/2.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 7 years, 2 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_response_info.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties.h
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index 654d262024a11a31cc91d3e06b02328e72add915..aadd3a2c889abc87ae871a60eb71db27baec9b0f 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -18,9 +18,9 @@
namespace net {
enum AlternateProtocol {
- NPN_SPDY_1 = 0,
- NPN_SPDY_MINIMUM_VERSION = NPN_SPDY_1,
- NPN_SPDY_2,
+ NPN_SPDY_2 = 0,
+ ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION = NPN_SPDY_2,
+ NPN_SPDY_MINIMUM_VERSION = NPN_SPDY_2,
NPN_SPDY_3,
NPN_SPDY_3_1,
NPN_SPDY_4A2,
@@ -28,14 +28,25 @@ enum AlternateProtocol {
NPN_HTTP2_DRAFT_04,
NPN_SPDY_MAXIMUM_VERSION = NPN_HTTP2_DRAFT_04,
QUIC,
- NUM_ALTERNATE_PROTOCOLS,
+ ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION = QUIC,
ALTERNATE_PROTOCOL_BROKEN, // The alternate protocol is known to be broken.
UNINITIALIZED_ALTERNATE_PROTOCOL,
};
+// Simply returns whether |protocol| is between
+// ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION and
+// ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION (inclusive).
+NET_EXPORT bool IsAlternateProtocolValid(AlternateProtocol protocol);
+
+enum AlternateProtocolSize {
+ NUM_VALID_ALTERNATE_PROTOCOLS =
+ ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION -
+ ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION + 1,
+};
+
NET_EXPORT const char* AlternateProtocolToString(AlternateProtocol protocol);
NET_EXPORT AlternateProtocol AlternateProtocolFromString(
- const std::string& protocol);
+ const std::string& str);
NET_EXPORT_PRIVATE AlternateProtocol AlternateProtocolFromNextProto(
NextProto next_proto);
« no previous file with comments | « net/http/http_response_info.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698