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

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: Rebase. Created 5 years, 11 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_server_properties.h ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties.cc
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc
index 514278cc2224253a0a2a8414c517e3bdae00b1b0..8192ae750dd0a6e60efaa9b03efaf8b8ecd89312 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -103,11 +103,20 @@ AlternateProtocol AlternateProtocolFromNextProto(NextProto next_proto) {
std::string AlternateProtocolInfo::ToString() const {
return base::StringPrintf("%d:%s p=%f%s", port,
- AlternateProtocolToString(protocol),
- probability,
+ AlternateProtocolToString(protocol), probability,
is_broken ? " (broken)" : "");
}
+std::string AlternateProtocolsToString(const AlternateProtocols& protocols) {
+ std::string output{};
Bence 2015/01/30 21:24:50 I don't think this format is currently allowed.
Ryan Hamilton 2015/01/30 21:50:19 the {}s? What's different from simply doing std::s
+ for (AlternateProtocols::const_iterator it = protocols.begin();
+ it != protocols.end(); ++it) {
+ output.append(it->ToString());
+ output.append("; ");
+ }
+ return output;
+}
+
// static
void HttpServerProperties::ForceHTTP11(SSLConfig* ssl_config) {
ssl_config->next_protos.clear();
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698