Index: content/renderer/media/rtc_peer_connection_handler.cc |
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc |
index 26c412753b2809a9ca15ea25e12c041a12415847..f889500630f5c0e093c2b5ccefbc4621b5fcbcca 100644 |
--- a/content/renderer/media/rtc_peer_connection_handler.cc |
+++ b/content/renderer/media/rtc_peer_connection_handler.cc |
@@ -1306,9 +1306,14 @@ void RTCPeerConnectionHandler::OnIceConnectionChange( |
// If the state becomes connected, send the time needed for PC to become |
// connected from checking to UMA. UMA data will help to know how much |
// time needed for PC to connect with remote peer. |
+ if (ice_connection_checking_start_.is_null()) { |
+ UMA_HISTOGRAM_MEDIUM_TIMES("WebRTC.PeerConnection.TimeToConnect", |
+ base::TimeDelta()); |
pthatcher2
2015/06/01 23:02:15
Can you put a comment explaining why it's correct
guoweis_left_chromium
2015/06/08 19:55:38
Done.
|
+ } else { |
UMA_HISTOGRAM_MEDIUM_TIMES( |
"WebRTC.PeerConnection.TimeToConnect", |
base::TimeTicks::Now() - ice_connection_checking_start_); |
+ } |
} |
track_metrics_.IceConnectionChange(new_state); |