| OLD | NEW |
| 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 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == | 2121 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == |
| 2122 "Disabled") { | 2122 "Disabled") { |
| 2123 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); | 2123 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); |
| 2124 } | 2124 } |
| 2125 | 2125 |
| 2126 if (configuration.tcp_candidate_policy == kTcpCandidatePolicyDisabled) { | 2126 if (configuration.tcp_candidate_policy == kTcpCandidatePolicyDisabled) { |
| 2127 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_TCP; | 2127 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_TCP; |
| 2128 LOG(LS_INFO) << "TCP candidates are disabled."; | 2128 LOG(LS_INFO) << "TCP candidates are disabled."; |
| 2129 } | 2129 } |
| 2130 | 2130 |
| 2131 if (configuration.candidate_network_policy == |
| 2132 kCandidateNetworkPolicyLowCost) { |
| 2133 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_COSTLY_NETWORKS; |
| 2134 LOG(LS_INFO) << "Do not gather candidates on high-cost networks"; |
| 2135 } |
| 2136 |
| 2131 port_allocator_->set_flags(portallocator_flags); | 2137 port_allocator_->set_flags(portallocator_flags); |
| 2132 // No step delay is used while allocating ports. | 2138 // No step delay is used while allocating ports. |
| 2133 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); | 2139 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); |
| 2134 port_allocator_->set_candidate_filter( | 2140 port_allocator_->set_candidate_filter( |
| 2135 ConvertIceTransportTypeToCandidateFilter(configuration.type)); | 2141 ConvertIceTransportTypeToCandidateFilter(configuration.type)); |
| 2136 | 2142 |
| 2137 // Call this last since it may create pooled allocator sessions using the | 2143 // Call this last since it may create pooled allocator sessions using the |
| 2138 // properties set above. | 2144 // properties set above. |
| 2139 port_allocator_->SetConfiguration(stun_servers, turn_servers, | 2145 port_allocator_->SetConfiguration(stun_servers, turn_servers, |
| 2140 configuration.ice_candidate_pool_size); | 2146 configuration.ice_candidate_pool_size); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2151 port_allocator_->set_candidate_filter( | 2157 port_allocator_->set_candidate_filter( |
| 2152 ConvertIceTransportTypeToCandidateFilter(configuration.type)); | 2158 ConvertIceTransportTypeToCandidateFilter(configuration.type)); |
| 2153 // Call this last since it may create pooled allocator sessions using the | 2159 // Call this last since it may create pooled allocator sessions using the |
| 2154 // candidate filter set above. | 2160 // candidate filter set above. |
| 2155 port_allocator_->SetConfiguration(stun_servers, turn_servers, | 2161 port_allocator_->SetConfiguration(stun_servers, turn_servers, |
| 2156 configuration.ice_candidate_pool_size); | 2162 configuration.ice_candidate_pool_size); |
| 2157 return true; | 2163 return true; |
| 2158 } | 2164 } |
| 2159 | 2165 |
| 2160 } // namespace webrtc | 2166 } // namespace webrtc |
| OLD | NEW |