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

Side by Side Diff: webrtc/p2p/client/basicportallocator.cc

Issue 2717893003: Making candidate pool size behave as decided in JSEP. (Closed)
Patch Set: Merge with master Created 3 years, 9 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
« no previous file with comments | « webrtc/p2p/base/portallocator_unittest.cc ('k') | webrtc/pc/peerconnection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return; 162 return;
163 } 163 }
164 } 164 }
165 165
166 metrics_observer()->IncrementEnumCounter( 166 metrics_observer()->IncrementEnumCounter(
167 webrtc::kEnumCounterIceRegathering, static_cast<int>(reason), 167 webrtc::kEnumCounterIceRegathering, static_cast<int>(reason),
168 static_cast<int>(IceRegatheringReason::MAX_VALUE)); 168 static_cast<int>(IceRegatheringReason::MAX_VALUE));
169 } 169 }
170 170
171 BasicPortAllocator::~BasicPortAllocator() { 171 BasicPortAllocator::~BasicPortAllocator() {
172 // Our created port allocator sessions depend on us, so destroy our remaining
173 // pooled sessions before anything else.
174 DiscardCandidatePool();
172 } 175 }
173 176
174 PortAllocatorSession* BasicPortAllocator::CreateSessionInternal( 177 PortAllocatorSession* BasicPortAllocator::CreateSessionInternal(
175 const std::string& content_name, int component, 178 const std::string& content_name, int component,
176 const std::string& ice_ufrag, const std::string& ice_pwd) { 179 const std::string& ice_ufrag, const std::string& ice_pwd) {
177 PortAllocatorSession* session = new BasicPortAllocatorSession( 180 PortAllocatorSession* session = new BasicPortAllocatorSession(
178 this, content_name, component, ice_ufrag, ice_pwd); 181 this, content_name, component, ice_ufrag, ice_pwd);
179 session->SignalIceRegathering.connect(this, 182 session->SignalIceRegathering.connect(this,
180 &BasicPortAllocator::OnIceRegathering); 183 &BasicPortAllocator::OnIceRegathering);
181 return session; 184 return session;
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 ServerAddresses servers; 1518 ServerAddresses servers;
1516 for (size_t i = 0; i < relays.size(); ++i) { 1519 for (size_t i = 0; i < relays.size(); ++i) {
1517 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { 1520 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) {
1518 servers.insert(relays[i].ports.front().address); 1521 servers.insert(relays[i].ports.front().address);
1519 } 1522 }
1520 } 1523 }
1521 return servers; 1524 return servers;
1522 } 1525 }
1523 1526
1524 } // namespace cricket 1527 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/portallocator_unittest.cc ('k') | webrtc/pc/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698