| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 } | 514 } |
| 515 | 515 |
| 516 bool TransportController::GetSslRole_n(const std::string& transport_name, | 516 bool TransportController::GetSslRole_n(const std::string& transport_name, |
| 517 rtc::SSLRole* role) const { | 517 rtc::SSLRole* role) const { |
| 518 RTC_DCHECK(network_thread_->IsCurrent()); | 518 RTC_DCHECK(network_thread_->IsCurrent()); |
| 519 | 519 |
| 520 const JsepTransport* t = GetJsepTransport(transport_name); | 520 const JsepTransport* t = GetJsepTransport(transport_name); |
| 521 if (!t) { | 521 if (!t) { |
| 522 return false; | 522 return false; |
| 523 } | 523 } |
| 524 t->GetSslRole(role); | 524 rtc::Optional<rtc::SSLRole> current_role = t->GetSslRole(); |
| 525 if (!current_role) { |
| 526 return false; |
| 527 } |
| 528 *role = *current_role; |
| 525 return true; | 529 return true; |
| 526 } | 530 } |
| 527 | 531 |
| 528 bool TransportController::SetLocalCertificate_n( | 532 bool TransportController::SetLocalCertificate_n( |
| 529 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) { | 533 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) { |
| 530 RTC_DCHECK(network_thread_->IsCurrent()); | 534 RTC_DCHECK(network_thread_->IsCurrent()); |
| 531 | 535 |
| 532 // Can't change a certificate, or set a null certificate. | 536 // Can't change a certificate, or set a null certificate. |
| 533 if (certificate_ || !certificate) { | 537 if (certificate_ || !certificate) { |
| 534 return false; | 538 return false; |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, | 883 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, |
| 880 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); | 884 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); |
| 881 } | 885 } |
| 882 } | 886 } |
| 883 | 887 |
| 884 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) { | 888 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) { |
| 885 SignalDtlsHandshakeError(error); | 889 SignalDtlsHandshakeError(error); |
| 886 } | 890 } |
| 887 | 891 |
| 888 } // namespace cricket | 892 } // namespace cricket |
| OLD | NEW |