Chromium Code Reviews| Index: webrtc/p2p/base/candidate.h | 
| diff --git a/webrtc/p2p/base/candidate.h b/webrtc/p2p/base/candidate.h | 
| index afea2a21c7b7f8b8530951a0339c7fc07bbb931c..caff4537c392ae43a029ba9e5a0f820289645b0a 100644 | 
| --- a/webrtc/p2p/base/candidate.h | 
| +++ b/webrtc/p2p/base/candidate.h | 
| @@ -169,6 +169,11 @@ class Candidate { | 
| tcptype_ = tcptype; | 
| } | 
| + const std::string& transport_name() const { return transport_name_; } | 
| + void set_transport_name(const std::string& transport_name) { | 
| + transport_name_ = transport_name; | 
| + } | 
| 
 
pthatcher1
2016/03/05 02:14:32
We should probably put a comment explaining what t
 
honghaiz3
2016/03/09 17:40:06
Done.
 
 | 
| + | 
| // Determines whether this candidate is equivalent to the given one. | 
| bool IsEquivalent(const Candidate& c) const { | 
| // We ignore the network name, since that is just debug information, and | 
| @@ -181,6 +186,13 @@ class Candidate { | 
| (related_address_ == c.related_address_); | 
| } | 
| + // Determines whether this candidate can be considered equivalent to the | 
| + // given one when looking for a matching candidate to remove. | 
| + bool MatchesForRemoval(const Candidate& c) const { | 
| + return component_ == c.component_ && protocol_ == c.protocol_ && | 
| + address_ == c.address_; | 
| + } | 
| + | 
| std::string ToString() const { | 
| return ToStringInternal(false); | 
| } | 
| @@ -245,8 +257,11 @@ class Candidate { | 
| rtc::SocketAddress related_address_; | 
| std::string tcptype_; | 
| uint32_t network_cost_ = 0; | 
| + std::string transport_name_; | 
| 
 
pthatcher1
2016/03/05 02:14:32
Can you make this the first thing (before id_) and
 
honghaiz3
2016/03/09 17:40:06
Done. The first thing was foundation.
 
 | 
| }; | 
| +typedef std::vector<Candidate> Candidates; | 
| 
 
pthatcher1
2016/03/05 02:14:32
Same here as before.
 
honghaiz3
2016/03/09 17:40:06
Done.
 
 | 
| + | 
| // Used during parsing and writing to map component to channel name | 
| // and back. This is primarily for converting old G-ICE candidate | 
| // signalling to new ICE candidate classes. |