| Index: talk/app/webrtc/jsepsessiondescription.cc
|
| diff --git a/talk/app/webrtc/jsepsessiondescription.cc b/talk/app/webrtc/jsepsessiondescription.cc
|
| index 226432db6956d63852d536fcb40fc68c778a8ec4..1ddbbba37af205795973d4a293c01addf6d89614 100644
|
| --- a/talk/app/webrtc/jsepsessiondescription.cc
|
| +++ b/talk/app/webrtc/jsepsessiondescription.cc
|
| @@ -154,6 +154,22 @@ bool JsepSessionDescription::AddCandidate(
|
| return true;
|
| }
|
|
|
| +bool JsepSessionDescription::RemoveCandidate(
|
| + const IceCandidateInterface* candidate) {
|
| + if (!candidate || candidate->sdp_mline_index() < 0 ||
|
| + candidate->candidate().priority() != 0) {
|
| + return false;
|
| + }
|
| + size_t mediasection_index = 0;
|
| + if (!GetMediasectionIndex(candidate, &mediasection_index) ||
|
| + mediasection_index >= number_of_mediasections()) {
|
| + return false;
|
| + }
|
| + int num_removed = candidate_collection_[mediasection_index].remove(candidate);
|
| + ASSERT(num_removed <= 1);
|
| + return num_removed > 0;
|
| +}
|
| +
|
| size_t JsepSessionDescription::number_of_mediasections() const {
|
| if (!description_)
|
| return 0;
|
|
|