Index: net/quic/quic_stream_factory.cc |
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc |
index 47a52426b5ea3e98443d00cdf92d74c090e2a08d..c9191c9a69ceb915581b8ba3ae98fe00b805ade9 100644 |
--- a/net/quic/quic_stream_factory.cc |
+++ b/net/quic/quic_stream_factory.cc |
@@ -10,6 +10,7 @@ |
#include "base/message_loop_proxy.h" |
#include "base/rand_util.h" |
#include "base/stl_util.h" |
+#include "base/values.h" |
#include "net/base/host_resolver.h" |
#include "net/base/net_errors.h" |
#include "net/base/single_request_host_resolver.h" |
@@ -333,6 +334,19 @@ void QuicStreamFactory::CloseAllSessions(int error) { |
DCHECK(all_sessions_.empty()); |
} |
+base::Value* QuicStreamFactory::QuicStreamFactoryInfoToValue() const { |
+ base::ListValue* list = new base::ListValue(); |
+ |
+ for (SessionMap::const_iterator it = active_sessions_.begin(); |
+ it != active_sessions_.end(); ++it) { |
+ const HostPortProxyPair& pair = it->first; |
+ const QuicClientSession* session = it->second; |
+ |
+ list->Append(session->GetInfoAsValue(pair.first)); |
+ } |
+ return list; |
+} |
+ |
bool QuicStreamFactory::HasActiveSession( |
const HostPortProxyPair& host_port_proxy_pair) { |
return ContainsKey(active_sessions_, host_port_proxy_pair); |