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

Unified Diff: content/renderer/media/rtc_peer_connection_handler.h

Issue 1274213006: Add instrumentation to track the IceCandidatePairType and IceConnectionState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
Index: content/renderer/media/rtc_peer_connection_handler.h
diff --git a/content/renderer/media/rtc_peer_connection_handler.h b/content/renderer/media/rtc_peer_connection_handler.h
index 95846af2ae772566eea948a4975fc5203156da75..bf81f30f285c306fc514a8b2b989035c6eda927b 100644
--- a/content/renderer/media/rtc_peer_connection_handler.h
+++ b/content/renderer/media/rtc_peer_connection_handler.h
@@ -204,6 +204,15 @@ class CONTENT_EXPORT RTCPeerConnectionHandler
const std::string& sdp, const std::string& type,
webrtc::SdpParseError* error);
+ // Report to UMA whether an IceConnectionState has occurred. It only records
+ // the first occurrence of a given state.
+ void ReportICEState(
+ webrtc::PeerConnectionInterface::IceConnectionState new_state);
+
+ // Reset UMA related members to the initial state. This is invoked at the
+ // constructor as well as after Ice Restart.
+ void ResetUMAStats();
+
// Virtual to allow mocks to override.
virtual scoped_refptr<base::SingleThreadTaskRunner> signaling_thread() const;
@@ -246,6 +255,11 @@ class CONTENT_EXPORT RTCPeerConnectionHandler
RemoteStreamMap remote_streams_;
scoped_refptr<webrtc::UMAObserver> uma_observer_;
base::TimeTicks ice_connection_checking_start_;
+
+ // Track which ICE Connection state that this PeerConnection has gone through.
+ bool ice_state_tracking_
+ [webrtc::PeerConnectionInterface::kIceConnectionStateMax];
+
base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler);

Powered by Google App Engine
This is Rietveld 408576698