Index: webrtc/p2p/client/basicportallocator.h |
diff --git a/webrtc/p2p/client/basicportallocator.h b/webrtc/p2p/client/basicportallocator.h |
index 204ff040a1deda0cff458a705c9d8beb708206bc..fe0a3b1df3ba22a929d5cdac10275059b25241e9 100644 |
--- a/webrtc/p2p/client/basicportallocator.h |
+++ b/webrtc/p2p/client/basicportallocator.h |
@@ -142,8 +142,13 @@ class BasicPortAllocatorSession : public PortAllocatorSession, |
return has_pairable_candidate_ && state_ != STATE_ERROR && |
state_ != STATE_PRUNED; |
} |
- |
- void set_pruned() { state_ = STATE_PRUNED; } |
+ // Sets the state to "PRUNED" and prunes the Port. |
+ void PrunePort() { |
pthatcher1
2016/09/15 18:54:38
Why not just "Prune()"?
honghaiz3
2016/09/16 01:41:29
Done.
|
+ state_ = STATE_PRUNED; |
+ if (port()) { |
+ port()->Prune(); |
+ } |
+ } |
void set_has_pairable_candidate(bool has_pairable_candidate) { |
if (has_pairable_candidate) { |
ASSERT(state_ == STATE_INPROGRESS); |
@@ -201,8 +206,12 @@ class BasicPortAllocatorSession : public PortAllocatorSession, |
// in order to avoid leaking any information. |
Candidate SanitizeRelatedAddress(const Candidate& c) const; |
- // Removes the ports and candidates on given networks. |
- void RemovePortsAndCandidates(const std::vector<rtc::Network*>& networks); |
+ std::vector<PortData*> GetUnprunedPortsOnNetworks( |
+ const std::vector<rtc::Network*>& networks); |
+ // Prunes ports and signal the remote side to remove the candidates generated |
+ // by these ports. |
pthatcher1
2016/09/15 18:54:38
generated by these ports => that were previously s
honghaiz3
2016/09/16 01:41:29
I used that were previously signaled from these po
|
+ void PrunePortsAndRemoveCandidates( |
+ const std::vector<PortData*>& port_data_list); |
// Gets filtered and sanitized candidates generated from a port and |
// append to |candidates|. |
void GetCandidatesFromPort(const PortData& data, |