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

Unified Diff: net/http/http_server_properties.h

Issue 2932953002: Persist broken and recently-broken alt-svcs to prefs in HttpServerPropertiesManager (Closed)
Patch Set: Fixed rch's comments from PS14 Created 3 years, 5 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
Index: net/http/http_server_properties.h
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index c521148b8cc73f5df1dffd5ecf7054e68e01cbf9..393c5087812b3e8ff43673573dac793398579bba 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -103,6 +103,7 @@ struct NET_EXPORT AlternativeService {
std::tie(other.protocol, other.host, other.port);
}
+ // Output format: "protocol host:port", e.g. "h2 www.google.com:1234".
std::string ToString() const;
NextProto protocol;
@@ -114,6 +115,12 @@ NET_EXPORT_PRIVATE std::ostream& operator<<(
std::ostream& os,
const AlternativeService& alternative_service);
+struct AlternativeServiceHash {
+ size_t operator()(const net::AlternativeService& entry) const {
+ return entry.protocol ^ std::hash<std::string>()(entry.host) ^ entry.port;
+ }
+};
+
class NET_EXPORT_PRIVATE AlternativeServiceInfo {
public:
AlternativeServiceInfo();

Powered by Google App Engine
This is Rietveld 408576698