Index: net/http/http_server_properties.h |
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h |
index dcb4cdcecf84b76590a28fa4ccaab9e4cf594e5a..6d53f41b068410a99b84b691701c63a05e97a8b3 100644 |
--- a/net/http/http_server_properties.h |
+++ b/net/http/http_server_properties.h |
@@ -86,6 +86,31 @@ NET_EXPORT AlternateProtocol AlternateProtocolFromString( |
NET_EXPORT_PRIVATE AlternateProtocol AlternateProtocolFromNextProto( |
NextProto next_proto); |
+struct NET_EXPORT AlternativeService { |
+ AlternativeService() |
+ : protocol(UNINITIALIZED_ALTERNATE_PROTOCOL), host(), port(0) {} |
+ |
+ AlternativeService(AlternateProtocol protocol, |
+ const std::string& host, |
+ uint16 port) |
+ : protocol(protocol), host(host), port(port) {} |
+ |
+ AlternativeService(const AlternativeService& altsvc) = default; |
+ AlternativeService& operator=(const AlternativeService& altsvc) = default; |
+ |
+ bool operator<(const AlternativeService& other) const { |
+ if (protocol != other.protocol) |
+ return protocol < other.protocol; |
+ if (host != other.host) |
+ return host < other.host; |
+ return port < other.port; |
+ } |
+ |
+ AlternateProtocol protocol; |
+ std::string host; |
+ uint16 port; |
+}; |
+ |
struct NET_EXPORT AlternateProtocolInfo { |
AlternateProtocolInfo() |
: port(0), |