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

Unified Diff: net/http/http_server_properties.cc

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: net/http/http_server_properties.cc
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc
index a9cbd7230e5eea4f24daf499cd2dd9a924a087aa..03ac55cec16c575d5892514d59c79ff435c6aa24 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -101,9 +101,19 @@ AlternateProtocol AlternateProtocolFromNextProto(NextProto next_proto) {
}
std::string AlternateProtocolInfo::ToString() const {
- return base::StringPrintf("%d:%s p=%f", port,
- AlternateProtocolToString(protocol),
- probability);
+ return base::StringPrintf(
+ "%d:%s p=%f", port, AlternateProtocolToString(protocol), probability);
+}
+
+std::string AlternateProtocolsToString(AlternateProtocols protocols) {
+ std::string output{};
+ for (AlternateProtocols::const_iterator it = protocols.begin();
+ it != protocols.end();
+ ++it) {
+ output.append(it->ToString());
+ output.append("; ");
+ }
+ return output;
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698