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

Side by Side Diff: webrtc/p2p/base/port.cc

Issue 1277263002: Add instrumentation to track the IceEndpointType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 if (iter != connections_.end()) 242 if (iter != connections_.end())
243 return iter->second; 243 return iter->second;
244 else 244 else
245 return NULL; 245 return NULL;
246 } 246 }
247 247
248 void Port::AddAddress(const rtc::SocketAddress& address, 248 void Port::AddAddress(const rtc::SocketAddress& address,
249 const rtc::SocketAddress& base_address, 249 const rtc::SocketAddress& base_address,
250 const rtc::SocketAddress& related_address, 250 const rtc::SocketAddress& related_address,
251 const std::string& protocol, 251 const std::string& protocol,
252 const std::string& relay_protocol,
252 const std::string& tcptype, 253 const std::string& tcptype,
253 const std::string& type, 254 const std::string& type,
254 uint32 type_preference, 255 uint32 type_preference,
255 uint32 relay_preference, 256 uint32 relay_preference,
256 bool final) { 257 bool final) {
257 if (protocol == TCP_PROTOCOL_NAME && type == LOCAL_PORT_TYPE) { 258 if (protocol == TCP_PROTOCOL_NAME && type == LOCAL_PORT_TYPE) {
258 ASSERT(!tcptype.empty()); 259 ASSERT(!tcptype.empty());
259 } 260 }
260 261
261 Candidate c; 262 Candidate c;
262 c.set_id(rtc::CreateRandomString(8)); 263 c.set_id(rtc::CreateRandomString(8));
263 c.set_component(component_); 264 c.set_component(component_);
264 c.set_type(type); 265 c.set_type(type);
265 c.set_protocol(protocol); 266 c.set_protocol(protocol);
267 c.set_relay_protocol(relay_protocol);
266 c.set_tcptype(tcptype); 268 c.set_tcptype(tcptype);
267 c.set_address(address); 269 c.set_address(address);
268 c.set_priority(c.GetPriority(type_preference, network_->preference(), 270 c.set_priority(c.GetPriority(type_preference, network_->preference(),
269 relay_preference)); 271 relay_preference));
270 c.set_username(username_fragment()); 272 c.set_username(username_fragment());
271 c.set_password(password_); 273 c.set_password(password_);
272 c.set_network_name(network_->name()); 274 c.set_network_name(network_->name());
273 c.set_network_type(network_->type()); 275 c.set_network_type(network_->type());
274 c.set_generation(generation_); 276 c.set_generation(generation_);
275 c.set_related_address(related_address); 277 c.set_related_address(related_address);
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 ASSERT(sent < 0); 1558 ASSERT(sent < 0);
1557 error_ = port_->GetError(); 1559 error_ = port_->GetError();
1558 sent_packets_discarded_++; 1560 sent_packets_discarded_++;
1559 } else { 1561 } else {
1560 send_rate_tracker_.Update(sent); 1562 send_rate_tracker_.Update(sent);
1561 } 1563 }
1562 return sent; 1564 return sent;
1563 } 1565 }
1564 1566
1565 } // namespace cricket 1567 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698