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

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

Issue 2623473004: Replace all use of the VERIFY macro. (Closed)
Patch Set: Delete a DCHECK, instead log and return failure. And fix compile error in previous patch set. Created 3 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 void set_generation_str(const std::string& str) { 143 void set_generation_str(const std::string& str) {
144 std::istringstream ist(str); 144 std::istringstream ist(str);
145 ist >> generation_; 145 ist >> generation_;
146 } 146 }
147 147
148 // |network_cost| measures the cost/penalty of using this candidate. A network 148 // |network_cost| measures the cost/penalty of using this candidate. A network
149 // cost of 0 indicates this candidate can be used freely. A value of 149 // cost of 0 indicates this candidate can be used freely. A value of
150 // rtc::kNetworkCostMax indicates it should be used only as the last resort. 150 // rtc::kNetworkCostMax indicates it should be used only as the last resort.
151 void set_network_cost(uint16_t network_cost) { 151 void set_network_cost(uint16_t network_cost) {
152 RTC_DCHECK(network_cost <= rtc::kNetworkCostMax); 152 RTC_DCHECK_LE(network_cost, rtc::kNetworkCostMax);
153 network_cost_ = network_cost; 153 network_cost_ = network_cost;
154 } 154 }
155 uint16_t network_cost() const { return network_cost_; } 155 uint16_t network_cost() const { return network_cost_; }
156 156
157 // An ID assigned to the network hosting the candidate. 157 // An ID assigned to the network hosting the candidate.
158 uint16_t network_id() const { return network_id_; } 158 uint16_t network_id() const { return network_id_; }
159 void set_network_id(uint16_t network_id) { network_id_ = network_id; } 159 void set_network_id(uint16_t network_id) { network_id_ = network_id; }
160 160
161 const std::string& foundation() const { 161 const std::string& foundation() const {
162 return foundation_; 162 return foundation_;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 virtual ~CandidateTranslator() {} 294 virtual ~CandidateTranslator() {}
295 virtual bool GetChannelNameFromComponent( 295 virtual bool GetChannelNameFromComponent(
296 int component, std::string* channel_name) const = 0; 296 int component, std::string* channel_name) const = 0;
297 virtual bool GetComponentFromChannelName( 297 virtual bool GetComponentFromChannelName(
298 const std::string& channel_name, int* component) const = 0; 298 const std::string& channel_name, int* component) const = 0;
299 }; 299 };
300 300
301 } // namespace cricket 301 } // namespace cricket
302 302
303 #endif // WEBRTC_P2P_BASE_CANDIDATE_H_ 303 #endif // WEBRTC_P2P_BASE_CANDIDATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698