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 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2498 RTCErrorType::NONE) { | 2498 RTCErrorType::NONE) { |
| 2499 return false; | 2499 return false; |
| 2500 } | 2500 } |
| 2501 | 2501 |
| 2502 port_allocator_->Initialize(); | 2502 port_allocator_->Initialize(); |
| 2503 | 2503 |
| 2504 // To handle both internal and externally created port allocator, we will | 2504 // To handle both internal and externally created port allocator, we will |
| 2505 // enable BUNDLE here. | 2505 // enable BUNDLE here. |
| 2506 int portallocator_flags = port_allocator_->flags(); | 2506 int portallocator_flags = port_allocator_->flags(); |
| 2507 portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET | | 2507 portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET | |
| 2508 cricket::PORTALLOCATOR_ENABLE_IPV6; | 2508 cricket::PORTALLOCATOR_ENABLE_IPV6 | |
| 2509 cricket::PORTALLOCATOR_ENABLE_IPV6_ON_WIFI; | |
| 2509 // If the disable-IPv6 flag was specified, we'll not override it | 2510 // If the disable-IPv6 flag was specified, we'll not override it |
| 2510 // by experiment. | 2511 // by experiment. |
| 2511 if (configuration.disable_ipv6) { | 2512 if (configuration.disable_ipv6) { |
| 2512 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); | 2513 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); |
| 2513 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") | 2514 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") |
| 2514 .find("Disabled") == 0) { | 2515 .find("Disabled") == 0) { |
| 2515 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); | 2516 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); |
| 2516 } | 2517 } |
| 2517 | 2518 |
| 2519 if (configuration.disable_ipv6_on_wifi) { | |
| 2520 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6_ON_WIFI); | |
| 2521 LOG(LS_INFO) << "IPv6 candidates on WIFI are disabled."; | |
|
Taylor Brandstetter
2017/03/05 23:45:30
nit: WIFI spelling
Zhi Huang
2017/03/06 21:14:19
Done.
| |
| 2522 } | |
| 2523 | |
| 2518 if (configuration.tcp_candidate_policy == kTcpCandidatePolicyDisabled) { | 2524 if (configuration.tcp_candidate_policy == kTcpCandidatePolicyDisabled) { |
| 2519 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_TCP; | 2525 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_TCP; |
| 2520 LOG(LS_INFO) << "TCP candidates are disabled."; | 2526 LOG(LS_INFO) << "TCP candidates are disabled."; |
| 2521 } | 2527 } |
| 2522 | 2528 |
| 2523 if (configuration.candidate_network_policy == | 2529 if (configuration.candidate_network_policy == |
| 2524 kCandidateNetworkPolicyLowCost) { | 2530 kCandidateNetworkPolicyLowCost) { |
| 2525 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_COSTLY_NETWORKS; | 2531 portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_COSTLY_NETWORKS; |
| 2526 LOG(LS_INFO) << "Do not gather candidates on high-cost networks"; | 2532 LOG(LS_INFO) << "Do not gather candidates on high-cost networks"; |
| 2527 } | 2533 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2561 } | 2567 } |
| 2562 return event_log_->StartLogging(file, max_size_bytes); | 2568 return event_log_->StartLogging(file, max_size_bytes); |
| 2563 } | 2569 } |
| 2564 | 2570 |
| 2565 void PeerConnection::StopRtcEventLog_w() { | 2571 void PeerConnection::StopRtcEventLog_w() { |
| 2566 if (event_log_) { | 2572 if (event_log_) { |
| 2567 event_log_->StopLogging(); | 2573 event_log_->StopLogging(); |
| 2568 } | 2574 } |
| 2569 } | 2575 } |
| 2570 } // namespace webrtc | 2576 } // namespace webrtc |
| OLD | NEW |