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

Unified Diff: net/http/http_server_properties.cc

Issue 701163002: Introduce AlternateProtocolInfo.is_broken. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. 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..4433b4e1435b8c06a70c39478d356c2fbcf38223 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -23,7 +23,6 @@ const char* const kAlternateProtocolStrings[] = {
"npn-h2-14", // HTTP/2 draft 14. 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