| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 Transport* transport = GetTransport_n(transport_name); | 440 Transport* transport = GetTransport_n(transport_name); |
| 441 if (!transport) { | 441 if (!transport) { |
| 442 // If we didn't find a transport, that's not an error; | 442 // If we didn't find a transport, that's not an error; |
| 443 // it could have been deleted as a result of bundling. | 443 // it could have been deleted as a result of bundling. |
| 444 // TODO(deadbeef): Make callers smarter so they won't attempt to set a | 444 // TODO(deadbeef): Make callers smarter so they won't attempt to set a |
| 445 // description on a deleted transport. | 445 // description on a deleted transport. |
| 446 return true; | 446 return true; |
| 447 } | 447 } |
| 448 | 448 |
| 449 // Older versions of Chrome expect the ICE role to be re-determined when an |
| 450 // ICE restart occurs, and also don't perform conflict resolution correctly, |
| 451 // so for now we can't safely stop doing this. |
| 452 // See: https://bugs.chromium.org/p/chromium/issues/detail?id=628676 |
| 453 // TODO(deadbeef): Remove this when these old versions of Chrome reach a low |
| 454 // enough population. |
| 455 if (transport->local_description() && |
| 456 IceCredentialsChanged(transport->local_description()->ice_ufrag, |
| 457 transport->local_description()->ice_pwd, |
| 458 tdesc.ice_ufrag, tdesc.ice_pwd)) { |
| 459 IceRole new_ice_role = |
| 460 (action == CA_OFFER) ? ICEROLE_CONTROLLING : ICEROLE_CONTROLLED; |
| 461 SetIceRole(new_ice_role); |
| 462 } |
| 463 |
| 449 return transport->SetLocalTransportDescription(tdesc, action, err); | 464 return transport->SetLocalTransportDescription(tdesc, action, err); |
| 450 } | 465 } |
| 451 | 466 |
| 452 bool TransportController::SetRemoteTransportDescription_n( | 467 bool TransportController::SetRemoteTransportDescription_n( |
| 453 const std::string& transport_name, | 468 const std::string& transport_name, |
| 454 const TransportDescription& tdesc, | 469 const TransportDescription& tdesc, |
| 455 ContentAction action, | 470 ContentAction action, |
| 456 std::string* err) { | 471 std::string* err) { |
| 457 RTC_DCHECK(network_thread_->IsCurrent()); | 472 RTC_DCHECK(network_thread_->IsCurrent()); |
| 458 | 473 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 } | 679 } |
| 665 if (gathering_state_ != new_gathering_state) { | 680 if (gathering_state_ != new_gathering_state) { |
| 666 gathering_state_ = new_gathering_state; | 681 gathering_state_ = new_gathering_state; |
| 667 signaling_thread_->Post( | 682 signaling_thread_->Post( |
| 668 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, | 683 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, |
| 669 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); | 684 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); |
| 670 } | 685 } |
| 671 } | 686 } |
| 672 | 687 |
| 673 } // namespace cricket | 688 } // namespace cricket |
| OLD | NEW |