Index: content/browser/renderer_host/p2p/socket_host.cc |
diff --git a/content/browser/renderer_host/p2p/socket_host.cc b/content/browser/renderer_host/p2p/socket_host.cc |
index 1693918bd32854572a8b085efa8b434cb61a3238..34dbbdf67a8104fe0c7c0b3a9ca3b17f80a2e2e1 100644 |
--- a/content/browser/renderer_host/p2p/socket_host.cc |
+++ b/content/browser/renderer_host/p2p/socket_host.cc |
@@ -4,6 +4,7 @@ |
#include "content/browser/renderer_host/p2p/socket_host.h" |
+#include "base/metrics/histogram.h" |
#include "base/sys_byteorder.h" |
#include "content/browser/renderer_host/p2p/socket_host_tcp.h" |
#include "content/browser/renderer_host/p2p/socket_host_tcp_server.h" |
@@ -460,10 +461,21 @@ P2PSocketHost::P2PSocketHost(IPC::Sender* message_sender, int socket_id) |
state_(STATE_UNINITIALIZED), |
dump_incoming_rtp_packet_(false), |
dump_outgoing_rtp_packet_(false), |
- weak_ptr_factory_(this) { |
+ weak_ptr_factory_(this), |
+ send_queue_length_max_(0), |
+ protocol_type_(P2PSocketHost::UNKNOWN) { |
} |
-P2PSocketHost::~P2PSocketHost() { } |
+P2PSocketHost::~P2PSocketHost() { |
+ DCHECK(protocol_type_ != P2PSocketHost::UNKNOWN); |
+ if (protocol_type_ == P2PSocketHost::UDP) { |
+ UMA_HISTOGRAM_COUNTS_100("WebRTC.MaxSystemConsecutiveEWB_UDP", |
+ send_queue_length_max_); |
+ } else { |
+ UMA_HISTOGRAM_COUNTS_100("WebRTC.MaxSystemConsecutiveEWB_TCP", |
+ send_queue_length_max_); |
+ } |
+} |
// Verifies that the packet |data| has a valid STUN header. |
// static |