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

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

Issue 2622453002: track SDP parse errors (Closed)
Patch Set: remove duplicate code Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bf7b89e94a01f0714c249f38de5accc15a489041..10786f90d2311797de1ddc5cd6df19b0db9383f5 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -1298,6 +1298,11 @@ void RTCPeerConnectionHandler::setRemoteDescription(
std::string sdp = description.sdp().utf8();
std::string type = description.type().utf8();
+ if (peer_connection_tracker_) {
+ peer_connection_tracker_->TrackSetSessionDescription(
+ this, sdp, type, PeerConnectionTracker::SOURCE_REMOTE);
+ }
+
webrtc::SdpParseError error;
// Since CreateNativeSessionDescription uses the dependency factory, we need
// to make this call on the current thread to be safe.
@@ -1310,14 +1315,14 @@ void RTCPeerConnectionHandler::setRemoteDescription(
reason_str.append(error.description);
LOG(ERROR) << reason_str;
request.requestFailed(blink::WebString::fromUTF8(reason_str));
+ if (peer_connection_tracker_) {
+ peer_connection_tracker_->TrackSessionDescriptionCallback(
+ this, PeerConnectionTracker::ACTION_SET_REMOTE_DESCRIPTION,
+ "OnFailure", reason_str);
+ }
return;
}
- if (peer_connection_tracker_) {
- peer_connection_tracker_->TrackSetSessionDescription(
- this, sdp, type, PeerConnectionTracker::SOURCE_REMOTE);
- }
-
if (!first_remote_description_ && IsOfferOrAnswer(native_desc)) {
first_remote_description_.reset(new FirstSessionDescription(native_desc));
if (first_local_description_) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698