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

Unified Diff: talk/app/webrtc/webrtcsessiondescriptionfactory.cc

Issue 1397973002: Merging BaseSession code into WebRtcSession. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merging with master (MediaStreamSignaling removal affected WebRtcSession). Created 5 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/webrtcsession_unittest.cc ('k') | talk/session/media/channelmanager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/webrtcsessiondescriptionfactory.cc
diff --git a/talk/app/webrtc/webrtcsessiondescriptionfactory.cc b/talk/app/webrtc/webrtcsessiondescriptionfactory.cc
index d391020cd17cd54bea98322abfb5b1f8a535c2b3..25965af79d30f92cddd20b999436d67d4a95f601 100644
--- a/talk/app/webrtc/webrtcsessiondescriptionfactory.cc
+++ b/talk/app/webrtc/webrtcsessiondescriptionfactory.cc
@@ -366,10 +366,10 @@ void WebRtcSessionDescriptionFactory::OnMessage(rtc::Message* msg) {
void WebRtcSessionDescriptionFactory::InternalCreateOffer(
CreateSessionDescriptionRequest request) {
- cricket::SessionDescription* desc(
- session_desc_factory_.CreateOffer(
- request.options,
- static_cast<cricket::BaseSession*>(session_)->local_description()));
+ cricket::SessionDescription* desc(session_desc_factory_.CreateOffer(
+ request.options, session_->local_description()
+ ? session_->local_description()->description()
+ : nullptr));
// RFC 3264
// When issuing an offer that modifies the session,
// the "o=" line of the new SDP MUST be identical to that in the
@@ -413,9 +413,12 @@ void WebRtcSessionDescriptionFactory::InternalCreateAnswer(
}
cricket::SessionDescription* desc(session_desc_factory_.CreateAnswer(
- static_cast<cricket::BaseSession*>(session_)->remote_description(),
- request.options,
- static_cast<cricket::BaseSession*>(session_)->local_description()));
+ session_->remote_description()
+ ? session_->remote_description()->description()
+ : nullptr,
+ request.options, session_->local_description()
+ ? session_->local_description()->description()
+ : nullptr));
// RFC 3264
// If the answer is different from the offer in any way (different IP
// addresses, ports, etc.), the origin line MUST be different in the answer.
« no previous file with comments | « talk/app/webrtc/webrtcsession_unittest.cc ('k') | talk/session/media/channelmanager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698