Compute RTCPeerConnection iceConnectionState based on RTCIceTransport states.

Previously both RTCPeerConnection::iceConnectionState and RTCIceTransport states
were calculated based on updates coming from webrtc layer to blink layer (from
signaling thread to main thread). Because there is no ordering between the two
updates, the peer connection iceConnectionState and ice transport states could
end up out of sync in blink layer. Fix state mismatch by updating the peer
connection iceConnectionState using blink layer ice transport states, on ice
transport state updates.

These changes only apply for unified plan because RTCIceTransport is not exposed
for plan B.

Bug: 953694,944036
Change-Id: I3b96189593a89715cc42a8113e97c2b31c7f0eb3
Commit-Queue: Marina Ciocea <>
Reviewed-by: Henrik Boström <>
Cr-Commit-Position: refs/heads/master@{#653116}
8 files changed