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

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: Fix tests Created 7 years, 12 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/quic/quic_client_session.h ('k') | net/quic/quic_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_session.cc
diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
index 19684af6b2f9e7e0b661b9cf5b2507036e09bcb1..3beba726d3defbdc793a60c6fc44a801de1b73c2 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"
@@ -113,6 +115,15 @@ void QuicClientSession::CloseSessionOnError(int error) {
stream_factory_->OnSessionClose(this);
}
+Value* QuicClientSession::GetInfoAsValue(const HostPortPair& pair) const {
+ DictionaryValue* dict = new DictionaryValue();
+ 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.
« no previous file with comments | « net/quic/quic_client_session.h ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698