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

Unified Diff: net/http/http_server_properties.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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.cc » ('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 a9cbd7230e5eea4f24daf499cd2dd9a924a087aa..cc41ea86ad18279e951ac13b8f3dce214ee21a96 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -20,10 +20,9 @@ const char* const kAlternateProtocolStrings[] = {
"npn-spdy/2",
"npn-spdy/3",
"npn-spdy/3.1",
- "npn-h2-14", // HTTP/2 draft 14. Called SPDY4 internally.
+ "npn-h2-15", // HTTP/2 draft-15. Called SPDY4 internally.
"quic"
};
-const char kBrokenAlternateProtocol[] = "Broken";
COMPILE_ASSERT(
arraysize(kAlternateProtocolStrings) == NUM_VALID_ALTERNATE_PROTOCOLS,
@@ -57,8 +56,6 @@ const char* AlternateProtocolToString(AlternateProtocol protocol) {
DCHECK(IsAlternateProtocolValid(protocol));
return kAlternateProtocolStrings[
protocol - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION];
- case ALTERNATE_PROTOCOL_BROKEN:
- return kBrokenAlternateProtocol;
case UNINITIALIZED_ALTERNATE_PROTOCOL:
return "Uninitialized";
}
@@ -73,8 +70,6 @@ AlternateProtocol AlternateProtocolFromString(const std::string& str) {
if (str == AlternateProtocolToString(protocol))
return protocol;
}
- if (str == kBrokenAlternateProtocol)
- return ALTERNATE_PROTOCOL_BROKEN;
return UNINITIALIZED_ALTERNATE_PROTOCOL;
}
@@ -101,9 +96,10 @@ AlternateProtocol AlternateProtocolFromNextProto(NextProto next_proto) {
}
std::string AlternateProtocolInfo::ToString() const {
- return base::StringPrintf("%d:%s p=%f", port,
+ return base::StringPrintf("%d:%s p=%f%s", port,
AlternateProtocolToString(protocol),
- probability);
+ probability,
+ is_broken ? " (broken)" : "");
}
} // namespace net
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698