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

Unified Diff: net/quic/quic_client_session.cc

Issue 11696010: Integrate QUIC info into net-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/quic/quic_client_session.cc
diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
index 18818157ed7731b0b35df9edd953c08a36a2c914..eb802bd3770e6c6fccc3b2c6cc6a405ada44ba8c 100644
--- a/net/quic/quic_client_session.cc
+++ b/net/quic/quic_client_session.cc
@@ -6,6 +6,8 @@
#include "base/message_loop.h"
#include "base/stl_util.h"
+#include "base/string_number_conversions.h"
+#include "base/values.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/quic/quic_connection_helper.h"
@@ -103,6 +105,16 @@ void QuicClientSession::StartReading() {
weak_factory_.GetWeakPtr(), rv));
}
+Value* QuicClientSession::GetInfoAsValue(const HostPortPair& pair) const {
+ DictionaryValue* dict = new DictionaryValue();
+ //dict->SetInteger("source_id", net_log_.source().id);
eroman 2013/01/04 00:16:14 If unused, then delete this line.
Ryan Hamilton 2013/01/04 02:56:05 Done.
+ dict->SetString("host_port_pair", pair.ToString());
+ dict->SetInteger("open_streams", GetNumOpenStreams());
+ dict->SetString("peer_address", peer_address().ToString());
+ dict->SetString("guid", base::Uint64ToString(guid()));
+ return dict;
+}
+
void QuicClientSession::OnReadComplete(int result) {
read_pending_ = false;
// TODO(rch): Inform the connection about the result.

Powered by Google App Engine
This is Rietveld 408576698