Chromium Code Reviews

Side by Side Diff: webrtc/api/peerconnection.cc

Issue 2092023004: Revert of Add virtual Initialize methods to PortAllocator and NetworkManager. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface_unittest.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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 2121 matching lines...)
2132 } 2132 }
2133 2133
2134 bool PeerConnection::InitializePortAllocator_n( 2134 bool PeerConnection::InitializePortAllocator_n(
2135 const RTCConfiguration& configuration) { 2135 const RTCConfiguration& configuration) {
2136 cricket::ServerAddresses stun_servers; 2136 cricket::ServerAddresses stun_servers;
2137 std::vector<cricket::RelayServerConfig> turn_servers; 2137 std::vector<cricket::RelayServerConfig> turn_servers;
2138 if (!ParseIceServers(configuration.servers, &stun_servers, &turn_servers)) { 2138 if (!ParseIceServers(configuration.servers, &stun_servers, &turn_servers)) {
2139 return false; 2139 return false;
2140 } 2140 }
2141 2141
2142 port_allocator_->Initialize();
2143
2144 // To handle both internal and externally created port allocator, we will 2142 // To handle both internal and externally created port allocator, we will
2145 // enable BUNDLE here. 2143 // enable BUNDLE here.
2146 int portallocator_flags = port_allocator_->flags(); 2144 int portallocator_flags = port_allocator_->flags();
2147 portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET | 2145 portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET |
2148 cricket::PORTALLOCATOR_ENABLE_IPV6; 2146 cricket::PORTALLOCATOR_ENABLE_IPV6;
2149 // If the disable-IPv6 flag was specified, we'll not override it 2147 // If the disable-IPv6 flag was specified, we'll not override it
2150 // by experiment. 2148 // by experiment.
2151 if (configuration.disable_ipv6) { 2149 if (configuration.disable_ipv6) {
2152 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); 2150 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
2153 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == 2151 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") ==
(...skipping 35 matching lines...)
2189 port_allocator_->set_candidate_filter( 2187 port_allocator_->set_candidate_filter(
2190 ConvertIceTransportTypeToCandidateFilter(configuration.type)); 2188 ConvertIceTransportTypeToCandidateFilter(configuration.type));
2191 // Call this last since it may create pooled allocator sessions using the 2189 // Call this last since it may create pooled allocator sessions using the
2192 // candidate filter set above. 2190 // candidate filter set above.
2193 port_allocator_->SetConfiguration(stun_servers, turn_servers, 2191 port_allocator_->SetConfiguration(stun_servers, turn_servers,
2194 configuration.ice_candidate_pool_size); 2192 configuration.ice_candidate_pool_size);
2195 return true; 2193 return true;
2196 } 2194 }
2197 2195
2198 } // namespace webrtc 2196 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine