diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc index 48ffebe222..665bb97cd4 100644 --- a/webrtc/pc/peerconnection.cc +++ b/webrtc/pc/peerconnection.cc @@ -1654,7 +1654,7 @@ void PeerConnection::DestroyReceiver(const std::string& track_id) { } } -void PeerConnection::OnIceConnectionChange( +void PeerConnection::OnIceConnectionStateChange( PeerConnectionInterface::IceConnectionState new_state) { RTC_DCHECK(signaling_thread()->IsCurrent()); // After transitioning to "closed", ignore any additional states from diff --git a/webrtc/pc/peerconnection.h b/webrtc/pc/peerconnection.h index ac8f33c705..43a2c7078d 100644 --- a/webrtc/pc/peerconnection.h +++ b/webrtc/pc/peerconnection.h @@ -203,7 +203,7 @@ class PeerConnection : public PeerConnectionInterface, VideoTrackInterface* video_track); // Implements IceObserver - void OnIceConnectionChange(IceConnectionState new_state) override; + void OnIceConnectionStateChange(IceConnectionState new_state) override; void OnIceGatheringChange(IceGatheringState new_state) override; void OnIceCandidate(const IceCandidateInterface* candidate) override; void OnIceCandidatesRemoved( diff --git a/webrtc/pc/webrtcsession.cc b/webrtc/pc/webrtcsession.cc index 22cb611740..78078e169c 100644 --- a/webrtc/pc/webrtcsession.cc +++ b/webrtc/pc/webrtcsession.cc @@ -1425,7 +1425,7 @@ void WebRtcSession::SetIceConnectionState( PeerConnectionInterface::kIceConnectionClosed); ice_connection_state_ = state; if (ice_observer_) { - ice_observer_->OnIceConnectionChange(ice_connection_state_); + ice_observer_->OnIceConnectionStateChange(ice_connection_state_); } } diff --git a/webrtc/pc/webrtcsession.h b/webrtc/pc/webrtcsession.h index f8e0830ad0..41aca9ec21 100644 --- a/webrtc/pc/webrtcsession.h +++ b/webrtc/pc/webrtcsession.h @@ -82,9 +82,7 @@ class IceObserver { public: IceObserver() {} // Called any time the IceConnectionState changes - // TODO(honghaiz): Change the name to OnIceConnectionStateChange so as to - // conform to the w3c standard. - virtual void OnIceConnectionChange( + virtual void OnIceConnectionStateChange( PeerConnectionInterface::IceConnectionState new_state) {} // Called any time the IceGatheringState changes virtual void OnIceGatheringChange( diff --git a/webrtc/pc/webrtcsession_unittest.cc b/webrtc/pc/webrtcsession_unittest.cc index f785151d18..b80949ce10 100644 --- a/webrtc/pc/webrtcsession_unittest.cc +++ b/webrtc/pc/webrtcsession_unittest.cc @@ -157,7 +157,7 @@ class MockIceObserver : public webrtc::IceObserver { virtual ~MockIceObserver() = default; - void OnIceConnectionChange( + void OnIceConnectionStateChange( PeerConnectionInterface::IceConnectionState new_state) override { ice_connection_state_ = new_state; ice_connection_state_history_.push_back(new_state);