Chromium Code Reviews| 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 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2108 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == | 2108 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == |
| 2109 "Disabled") { | 2109 "Disabled") { |
| 2110 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); | 2110 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); |
| 2111 } | 2111 } |
| 2112 | 2112 |
| 2113 if (configuration.tcp_candidate_policy == kTcpCandidatePolicyDisabled) { | 2113 if (configuration.tcp_candidate_policy == kTcpCandidatePolicyDisabled) { |
| 2114 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_TCP; | 2114 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_TCP; |
| 2115 LOG(LS_INFO) << "TCP candidates are disabled."; | 2115 LOG(LS_INFO) << "TCP candidates are disabled."; |
| 2116 } | 2116 } |
| 2117 | 2117 |
| 2118 if (configuration.gather_low_cost_network_only) { | |
|
pthatcher1
2016/05/17 20:44:27
It seems like we should make this an enum policy l
honghaiz3
2016/05/18 05:55:02
Done.
| |
| 2119 portallocator_flags |= cricket::PORTALLOCATOR_GATHER_LOW_COST_NETWORK_ONLY; | |
| 2120 LOG(LS_INFO) << "Only gather on lower-cost networks"; | |
| 2121 } | |
| 2122 | |
| 2118 port_allocator_->set_flags(portallocator_flags); | 2123 port_allocator_->set_flags(portallocator_flags); |
| 2119 // No step delay is used while allocating ports. | 2124 // No step delay is used while allocating ports. |
| 2120 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); | 2125 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); |
| 2121 port_allocator_->set_candidate_filter( | 2126 port_allocator_->set_candidate_filter( |
| 2122 ConvertIceTransportTypeToCandidateFilter(configuration.type)); | 2127 ConvertIceTransportTypeToCandidateFilter(configuration.type)); |
| 2123 | 2128 |
| 2124 // Call this last since it may create pooled allocator sessions using the | 2129 // Call this last since it may create pooled allocator sessions using the |
| 2125 // properties set above. | 2130 // properties set above. |
| 2126 port_allocator_->SetConfiguration(stun_servers, turn_servers, | 2131 port_allocator_->SetConfiguration(stun_servers, turn_servers, |
| 2127 configuration.ice_candidate_pool_size); | 2132 configuration.ice_candidate_pool_size); |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 2138 port_allocator_->set_candidate_filter( | 2143 port_allocator_->set_candidate_filter( |
| 2139 ConvertIceTransportTypeToCandidateFilter(configuration.type)); | 2144 ConvertIceTransportTypeToCandidateFilter(configuration.type)); |
| 2140 // Call this last since it may create pooled allocator sessions using the | 2145 // Call this last since it may create pooled allocator sessions using the |
| 2141 // candidate filter set above. | 2146 // candidate filter set above. |
| 2142 port_allocator_->SetConfiguration(stun_servers, turn_servers, | 2147 port_allocator_->SetConfiguration(stun_servers, turn_servers, |
| 2143 configuration.ice_candidate_pool_size); | 2148 configuration.ice_candidate_pool_size); |
| 2144 return true; | 2149 return true; |
| 2145 } | 2150 } |
| 2146 | 2151 |
| 2147 } // namespace webrtc | 2152 } // namespace webrtc |
| OLD | NEW |