Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Side by Side Diff: webrtc/p2p/base/candidate.h

Issue 1648813004: Remove candidates when doing continual gathering (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // We ignore the network name, since that is just debug information, and 163 // We ignore the network name, since that is just debug information, and
164 // the priority, since that should be the same if the rest is (and it's 164 // the priority, since that should be the same if the rest is (and it's
165 // a float so equality checking is always worrisome). 165 // a float so equality checking is always worrisome).
166 return (component_ == c.component_) && (protocol_ == c.protocol_) && 166 return (component_ == c.component_) && (protocol_ == c.protocol_) &&
167 (address_ == c.address_) && (username_ == c.username_) && 167 (address_ == c.address_) && (username_ == c.username_) &&
168 (password_ == c.password_) && (type_ == c.type_) && 168 (password_ == c.password_) && (type_ == c.type_) &&
169 (generation_ == c.generation_) && (foundation_ == c.foundation_) && 169 (generation_ == c.generation_) && (foundation_ == c.foundation_) &&
170 (related_address_ == c.related_address_); 170 (related_address_ == c.related_address_);
171 } 171 }
172 172
173 // Check the equivalence of two candidates even if they are peer-reflexive
174 // candidates of which not all fields have been filled.
175 bool IsWeaklyEquivalent(const Candidate& c) const {
pthatcher1 2016/02/10 00:01:41 We should make this something more removal-specifi
honghaiz3 2016/02/10 19:22:44 Done.
176 return component_ == c.component_ && protocol_ == c.protocol_ &&
177 address_ == c.address_;
178 }
179
173 std::string ToString() const { 180 std::string ToString() const {
174 return ToStringInternal(false); 181 return ToStringInternal(false);
175 } 182 }
176 183
177 std::string ToSensitiveString() const { 184 std::string ToSensitiveString() const {
178 return ToStringInternal(true); 185 return ToStringInternal(true);
179 } 186 }
180 187
181 uint32_t GetPriority(uint32_t type_preference, 188 uint32_t GetPriority(uint32_t type_preference,
182 int network_adapter_preference, 189 int network_adapter_preference,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 virtual ~CandidateTranslator() {} 250 virtual ~CandidateTranslator() {}
244 virtual bool GetChannelNameFromComponent( 251 virtual bool GetChannelNameFromComponent(
245 int component, std::string* channel_name) const = 0; 252 int component, std::string* channel_name) const = 0;
246 virtual bool GetComponentFromChannelName( 253 virtual bool GetComponentFromChannelName(
247 const std::string& channel_name, int* component) const = 0; 254 const std::string& channel_name, int* component) const = 0;
248 }; 255 };
249 256
250 } // namespace cricket 257 } // namespace cricket
251 258
252 #endif // WEBRTC_P2P_BASE_CANDIDATE_H_ 259 #endif // WEBRTC_P2P_BASE_CANDIDATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698