Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: talk/app/webrtc/webrtcsession.cc

Issue 1516993002: Properly handle different transports having different SSL roles. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 756 }
757 757
758 void WebRtcSession::SetSdesPolicy(cricket::SecurePolicy secure_policy) { 758 void WebRtcSession::SetSdesPolicy(cricket::SecurePolicy secure_policy) {
759 webrtc_session_desc_factory_->SetSdesPolicy(secure_policy); 759 webrtc_session_desc_factory_->SetSdesPolicy(secure_policy);
760 } 760 }
761 761
762 cricket::SecurePolicy WebRtcSession::SdesPolicy() const { 762 cricket::SecurePolicy WebRtcSession::SdesPolicy() const {
763 return webrtc_session_desc_factory_->SdesPolicy(); 763 return webrtc_session_desc_factory_->SdesPolicy();
764 } 764 }
765 765
766 bool WebRtcSession::GetSslRole(rtc::SSLRole* role) { 766 bool WebRtcSession::GetSslRole(const std::string& transport_name,
767 rtc::SSLRole* role) {
767 if (!local_desc_ || !remote_desc_) { 768 if (!local_desc_ || !remote_desc_) {
768 LOG(LS_INFO) << "Local and Remote descriptions must be applied to get " 769 LOG(LS_INFO) << "Local and Remote descriptions must be applied to get "
769 << "SSL Role of the session."; 770 << "SSL Role of the session.";
770 return false; 771 return false;
771 } 772 }
772 773
773 return transport_controller_->GetSslRole(role); 774 return transport_controller_->GetSslRole(transport_name, role);
774 } 775 }
775 776
776 void WebRtcSession::CreateOffer( 777 void WebRtcSession::CreateOffer(
777 CreateSessionDescriptionObserver* observer, 778 CreateSessionDescriptionObserver* observer,
778 const PeerConnectionInterface::RTCOfferAnswerOptions& options, 779 const PeerConnectionInterface::RTCOfferAnswerOptions& options,
779 const cricket::MediaSessionOptions& session_options) { 780 const cricket::MediaSessionOptions& session_options) {
780 webrtc_session_desc_factory_->CreateOffer(observer, options, session_options); 781 webrtc_session_desc_factory_->CreateOffer(observer, options, session_options);
781 } 782 }
782 783
783 void WebRtcSession::CreateAnswer( 784 void WebRtcSession::CreateAnswer(
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 } 2190 }
2190 } 2191 }
2191 2192
2192 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2193 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2193 const rtc::SentPacket& sent_packet) { 2194 const rtc::SentPacket& sent_packet) {
2194 RTC_DCHECK(worker_thread()->IsCurrent()); 2195 RTC_DCHECK(worker_thread()->IsCurrent());
2195 media_controller_->call_w()->OnSentPacket(sent_packet); 2196 media_controller_->call_w()->OnSentPacket(sent_packet);
2196 } 2197 }
2197 2198
2198 } // namespace webrtc 2199 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698