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

Unified Diff: net/http/http_alternate_protocols.cc

Issue 6465001: Display more information at chrome://net-internals/#spdy... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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_alternate_protocols.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_alternate_protocols.cc
===================================================================
--- net/http/http_alternate_protocols.cc (revision 74346)
+++ net/http/http_alternate_protocols.cc (working copy)
@@ -5,6 +5,7 @@
#include "net/http/http_alternate_protocols.h"
#include "base/logging.h"
+#include "base/stringprintf.h"
#include "base/stl_util-inl.h"
namespace net {
@@ -15,6 +16,28 @@
"npn-spdy/2",
};
+const char* HttpAlternateProtocols::ProtocolToString(
+ HttpAlternateProtocols::Protocol protocol) {
+ switch (protocol) {
+ case HttpAlternateProtocols::NPN_SPDY_1:
+ case HttpAlternateProtocols::NPN_SPDY_2:
+ return HttpAlternateProtocols::kProtocolStrings[protocol];
+ case HttpAlternateProtocols::BROKEN:
+ return "Broken";
+ case HttpAlternateProtocols::UNINITIALIZED:
+ return "Uninitialized";
+ default:
+ NOTREACHED();
+ return "";
+ }
+}
+
+
+std::string HttpAlternateProtocols::PortProtocolPair::ToString() const {
+ return base::StringPrintf("%d:%s", port,
+ HttpAlternateProtocols::ProtocolToString(protocol));
+}
+
// static
HttpAlternateProtocols::PortProtocolPair*
HttpAlternateProtocols::forced_alternate_protocol_ = NULL;
« no previous file with comments | « net/http/http_alternate_protocols.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698