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

Unified Diff: net/http/http_server_properties.h

Issue 987813002: Introduce AlternativeService in BrokenAlternateProtol{List,Map}. (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 | « no previous file | net/http/http_server_properties_impl.h » ('j') | net/http/http_server_properties_impl.h » ('J')
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 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),
« no previous file with comments | « no previous file | net/http/http_server_properties_impl.h » ('j') | net/http/http_server_properties_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698