Chromium Code Reviews| Index: webrtc/p2p/base/transportcontroller.cc |
| diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc |
| index 4b24b1990d205a1ae12ec6cf87015ee50cf17822..3d46a798f1dddcc07979d779c1d26a14280dde1a 100644 |
| --- a/webrtc/p2p/base/transportcontroller.cc |
| +++ b/webrtc/p2p/base/transportcontroller.cc |
| @@ -117,6 +117,18 @@ bool TransportController::GetLocalCertificate( |
| this, transport_name, certificate)); |
| } |
| +bool TransportController::GetLocalCertificate_n( |
|
hbos
2016/12/13 14:14:34
All of these were moved after being made public, t
hbos
2016/12/14 14:56:31
(Reverted the move after changing so that they can
|
| + const std::string& transport_name, |
| + rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const { |
| + RTC_DCHECK(network_thread_->IsCurrent()); |
| + |
| + const JsepTransport* t = GetJsepTransport(transport_name); |
| + if (!t) { |
| + return false; |
| + } |
| + return t->GetLocalCertificate(certificate); |
| +} |
| + |
| std::unique_ptr<rtc::SSLCertificate> |
| TransportController::GetRemoteSSLCertificate( |
| const std::string& transport_name) const { |
| @@ -125,6 +137,21 @@ TransportController::GetRemoteSSLCertificate( |
| this, transport_name)); |
| } |
| +std::unique_ptr<rtc::SSLCertificate> |
| +TransportController::GetRemoteSSLCertificate_n( |
| + const std::string& transport_name) const { |
| + RTC_DCHECK(network_thread_->IsCurrent()); |
| + |
| + // Get the certificate from the RTP channel's DTLS handshake. Should be |
| + // identical to the RTCP channel's, since they were given the same remote |
| + // fingerprint. |
| + const RefCountedChannel* ch = GetChannel_n(transport_name, 1); |
| + if (!ch) { |
| + return nullptr; |
| + } |
| + return ch->dtls()->GetRemoteSSLCertificate(); |
| +} |
| + |
| bool TransportController::SetLocalTransportDescription( |
| const std::string& transport_name, |
| const TransportDescription& tdesc, |
| @@ -182,6 +209,17 @@ bool TransportController::GetStats(const std::string& transport_name, |
| rtc::Bind(&TransportController::GetStats_n, this, transport_name, stats)); |
| } |
| +bool TransportController::GetStats_n(const std::string& transport_name, |
| + TransportStats* stats) { |
| + RTC_DCHECK(network_thread_->IsCurrent()); |
| + |
| + JsepTransport* transport = GetJsepTransport(transport_name); |
| + if (!transport) { |
| + return false; |
| + } |
| + return transport->GetStats(stats); |
| +} |
| + |
| void TransportController::SetMetricsObserver( |
| webrtc::MetricsObserverInterface* metrics_observer) { |
| return network_thread_->Invoke<void>( |
| @@ -491,33 +529,6 @@ bool TransportController::SetLocalCertificate_n( |
| return true; |
| } |
| -bool TransportController::GetLocalCertificate_n( |
| - const std::string& transport_name, |
| - rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const { |
| - RTC_DCHECK(network_thread_->IsCurrent()); |
| - |
| - const JsepTransport* t = GetJsepTransport(transport_name); |
| - if (!t) { |
| - return false; |
| - } |
| - return t->GetLocalCertificate(certificate); |
| -} |
| - |
| -std::unique_ptr<rtc::SSLCertificate> |
| -TransportController::GetRemoteSSLCertificate_n( |
| - const std::string& transport_name) const { |
| - RTC_DCHECK(network_thread_->IsCurrent()); |
| - |
| - // Get the certificate from the RTP channel's DTLS handshake. Should be |
| - // identical to the RTCP channel's, since they were given the same remote |
| - // fingerprint. |
| - const RefCountedChannel* ch = GetChannel_n(transport_name, 1); |
| - if (!ch) { |
| - return nullptr; |
| - } |
| - return ch->dtls()->GetRemoteSSLCertificate(); |
| -} |
| - |
| bool TransportController::SetLocalTransportDescription_n( |
| const std::string& transport_name, |
| const TransportDescription& tdesc, |
| @@ -666,17 +677,6 @@ bool TransportController::ReadyForRemoteCandidates_n( |
| return transport->ready_for_remote_candidates(); |
| } |
| -bool TransportController::GetStats_n(const std::string& transport_name, |
| - TransportStats* stats) { |
| - RTC_DCHECK(network_thread_->IsCurrent()); |
| - |
| - JsepTransport* transport = GetJsepTransport(transport_name); |
| - if (!transport) { |
| - return false; |
| - } |
| - return transport->GetStats(stats); |
| -} |
| - |
| void TransportController::SetMetricsObserver_n( |
| webrtc::MetricsObserverInterface* metrics_observer) { |
| RTC_DCHECK(network_thread_->IsCurrent()); |