Bug 1196974: remove mozDontOfferDataChannel from code and test. r?bwc
MozReview-Commit-ID: 1CW3TaSMVZw
--- a/media/webrtc/signaling/gtest/jsep_session_unittest.cpp
+++ b/media/webrtc/signaling/gtest/jsep_session_unittest.cpp
@@ -2948,17 +2948,16 @@ INSTANTIATE_TEST_CASE_P(
// offerToReceiveXxx variants
TEST_F(JsepSessionTest, OfferAnswerRecvOnlyLines)
{
JsepOfferOptions options;
options.mOfferToReceiveAudio = Some(static_cast<size_t>(1U));
options.mOfferToReceiveVideo = Some(static_cast<size_t>(2U));
- options.mDontOfferDataChannel = Some(true);
std::string offer = CreateOffer(Some(options));
UniquePtr<Sdp> parsedOffer(Parse(offer));
ASSERT_TRUE(!!parsedOffer);
ASSERT_EQ(3U, parsedOffer->GetMediaSectionCount());
ASSERT_EQ(SdpMediaSection::kAudio,
parsedOffer->GetMediaSection(0).GetMediaType());
@@ -3025,17 +3024,16 @@ TEST_F(JsepSessionTest, OfferAnswerRecvO
TEST_F(JsepSessionTest, OfferAnswerSendOnlyLines)
{
AddTracks(*mSessionOff, "audio,video,video");
JsepOfferOptions options;
options.mOfferToReceiveAudio = Some(static_cast<size_t>(0U));
options.mOfferToReceiveVideo = Some(static_cast<size_t>(1U));
- options.mDontOfferDataChannel = Some(true);
std::string offer = CreateOffer(Some(options));
UniquePtr<Sdp> outputSdp(Parse(offer));
ASSERT_TRUE(!!outputSdp);
ASSERT_EQ(3U, outputSdp->GetMediaSectionCount());
ASSERT_EQ(SdpMediaSection::kAudio,
outputSdp->GetMediaSection(0).GetMediaType());
--- a/media/webrtc/signaling/src/jsep/JsepSession.h
+++ b/media/webrtc/signaling/src/jsep/JsepSession.h
@@ -44,17 +44,16 @@ enum JsepDescriptionPendingOrCurrent {
kJsepDescriptionPending,
kJsepDescriptionPendingOrCurrent
};
struct JsepOAOptions {};
struct JsepOfferOptions : public JsepOAOptions {
Maybe<size_t> mOfferToReceiveAudio;
Maybe<size_t> mOfferToReceiveVideo;
- Maybe<bool> mDontOfferDataChannel;
Maybe<bool> mIceRestart; // currently ignored by JsepSession
};
struct JsepAnswerOptions : public JsepOAOptions {};
enum JsepBundlePolicy {
kBundleBalanced,
kBundleMaxCompat,
kBundleMaxBundle
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
@@ -423,23 +423,20 @@ JsepSessionImpl::SetupOfferMSections(con
NS_ENSURE_SUCCESS(rv, rv);
rv = SetupOfferMSectionsByType(
SdpMediaSection::kVideo, options.mOfferToReceiveVideo, sdp);
NS_ENSURE_SUCCESS(rv, rv);
- if (!(options.mDontOfferDataChannel.isSome() &&
- *options.mDontOfferDataChannel)) {
- rv = SetupOfferMSectionsByType(
- SdpMediaSection::kApplication, Maybe<size_t>(), sdp);
-
- NS_ENSURE_SUCCESS(rv, rv);
- }
+ rv = SetupOfferMSectionsByType(
+ SdpMediaSection::kApplication, Maybe<size_t>(), sdp);
+
+ NS_ENSURE_SUCCESS(rv, rv);
if (!sdp->GetMediaSectionCount()) {
JSEP_SET_ERROR("Cannot create an offer with no local tracks, "
"no offerToReceiveAudio/Video, and no DataChannel.");
return NS_ERROR_INVALID_ARG;
}
return NS_OK;
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -1456,20 +1456,16 @@ PeerConnectionImpl::CreateOffer(const RT
if (aOptions.mOfferToReceiveVideo.WasPassed()) {
options.mOfferToReceiveVideo =
mozilla::Some(size_t(aOptions.mOfferToReceiveVideo.Value()));
}
options.mIceRestart = mozilla::Some(aOptions.mIceRestart);
- if (aOptions.mMozDontOfferDataChannel.WasPassed()) {
- options.mDontOfferDataChannel =
- mozilla::Some(aOptions.mMozDontOfferDataChannel.Value());
- }
return CreateOffer(options);
}
static void DeferredCreateOffer(const std::string& aPcHandle,
const JsepOfferOptions& aOptions) {
PeerConnectionWrapper wrapper(aPcHandle);
if (wrapper.impl()) {