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

Unified Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 1940493002: Add Stats to Stun ping. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rename. Created 4 years, 7 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 | « webrtc/api/statstypes.cc ('k') | webrtc/p2p/base/port.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index b1de3e91d3d4a3ee5bca7221e515a10c4aae090c..714795fea0e8279888ab3deed6e23fca4f5897ac 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -1017,24 +1017,16 @@ bool P2PTransportChannel::GetStats(ConnectionInfos *infos) {
// Gather connection infos.
infos->clear();
- std::vector<Connection *>::const_iterator it;
for (Connection* connection : connections_) {
- ConnectionInfo info;
+ ConnectionInfo info = connection->stats();
info.best_connection = (best_connection_ == connection);
info.receiving = connection->receiving();
- info.writable =
- (connection->write_state() == Connection::STATE_WRITABLE);
+ info.writable = (connection->write_state() == Connection::STATE_WRITABLE);
info.timeout =
(connection->write_state() == Connection::STATE_WRITE_TIMEOUT);
info.new_connection = !connection->reported();
connection->set_reported(true);
info.rtt = connection->rtt();
- info.sent_total_bytes = connection->sent_total_bytes();
- info.sent_bytes_second = connection->sent_bytes_second();
- info.sent_discarded_packets = connection->sent_discarded_packets();
- info.sent_total_packets = connection->sent_total_packets();
- info.recv_total_bytes = connection->recv_total_bytes();
- info.recv_bytes_second = connection->recv_bytes_second();
info.local_candidate = connection->local_candidate();
info.remote_candidate = connection->remote_candidate();
info.key = connection;
« no previous file with comments | « webrtc/api/statstypes.cc ('k') | webrtc/p2p/base/port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698