| Index: talk/app/webrtc/jsepicecandidate.cc
|
| diff --git a/talk/app/webrtc/jsepicecandidate.cc b/talk/app/webrtc/jsepicecandidate.cc
|
| index 768bd0a281bc3ee7097a116f00e3e4cc677c8644..2ca7ab134c74399d2304d69d34c1d3c490ce3101 100644
|
| --- a/talk/app/webrtc/jsepicecandidate.cc
|
| +++ b/talk/app/webrtc/jsepicecandidate.cc
|
| @@ -96,4 +96,15 @@ bool JsepCandidateCollection::HasCandidate(
|
| return ret;
|
| }
|
|
|
| +int JsepCandidateCollection::remove(const IceCandidateInterface* target) {
|
| + size_t original_size = candidates_.size();
|
| + auto new_end = std::remove_if(
|
| + candidates_.begin(), candidates_.end(),
|
| + [target](JsepIceCandidate* candidate) {
|
| + return target->candidate().IsWeaklyEquivalent(candidate->candidate());
|
| + });
|
| + candidates_.erase(new_end, candidates_.end());
|
| + return candidates_.size() - original_size;
|
| +}
|
| +
|
| } // namespace webrtc
|
|
|