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

Unified Diff: net/spdy/spdy_session.cc

Issue 9625009: Add the spdy protocol to the information displayed about a spdy session in net-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 4b21695d390004b6f112ba36e70ffbda2c442e93..c9b83d118c63e3e37e9f108e9ef13bddef90a76c 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -1110,6 +1110,16 @@ Value* SpdySession::GetInfoAsValue() const {
dict->SetBoolean("is_secure", is_secure_);
+ SSLClientSocket::NextProto proto = SSLClientSocket::kProtoUnknown;
+ if (is_secure_) {
+ SSLClientSocket* ssl_socket =
+ reinterpret_cast<SSLClientSocket*>(connection_->socket());
eroman 2012/03/07 19:27:32 Are you absolutely sure about this? Reinterpret ca
mmenke 2012/03/07 19:32:32 Drive by comment: Looks like all the other instan
Ryan Hamilton 2012/03/07 19:46:22 Heh, yes I agree. This is already wrapped in an i
Ryan Hamilton 2012/03/07 19:46:22 eroman: yes in the sense that we do this repeatedl
mmenke 2012/03/07 19:47:59 Oops...Indeed it is. Amusingly, I just looked at
+ DCHECK(ssl_socket);
+ proto = ssl_socket->protocol_negotiated();
+ }
+ dict->SetString("protocol_negotiated",
+ SSLClientSocket::NextProtoToString(proto));
+
dict->SetInteger("error", error_);
dict->SetInteger("max_concurrent_streams", max_concurrent_streams_);

Powered by Google App Engine
This is Rietveld 408576698