| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turn_config; | 360 std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turn_config; |
| 361 if (!ParseIceServers(configuration.servers, &stun_config, &turn_config)) { | 361 if (!ParseIceServers(configuration.servers, &stun_config, &turn_config)) { |
| 362 return false; | 362 return false; |
| 363 } | 363 } |
| 364 port_allocator_.reset( | 364 port_allocator_.reset( |
| 365 allocator_factory->CreatePortAllocator(stun_config, turn_config)); | 365 allocator_factory->CreatePortAllocator(stun_config, turn_config)); |
| 366 | 366 |
| 367 // To handle both internal and externally created port allocator, we will | 367 // To handle both internal and externally created port allocator, we will |
| 368 // enable BUNDLE here. | 368 // enable BUNDLE here. |
| 369 int portallocator_flags = port_allocator_->flags(); | 369 int portallocator_flags = port_allocator_->flags(); |
| 370 portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET | | 370 portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | |
| 371 cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET | |
| 371 cricket::PORTALLOCATOR_ENABLE_IPV6; | 372 cricket::PORTALLOCATOR_ENABLE_IPV6; |
| 372 bool value; | 373 bool value; |
| 373 // If IPv6 flag was specified, we'll not override it by experiment. | 374 // If IPv6 flag was specified, we'll not override it by experiment. |
| 374 if (FindConstraint( | 375 if (FindConstraint( |
| 375 constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) { | 376 constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) { |
| 376 if (!value) { | 377 if (!value) { |
| 377 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); | 378 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); |
| 378 } | 379 } |
| 379 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == | 380 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == |
| 380 "Disabled") { | 381 "Disabled") { |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 if (ice_gathering_state_ != kIceGatheringComplete) { | 907 if (ice_gathering_state_ != kIceGatheringComplete) { |
| 907 ice_gathering_state_ = kIceGatheringComplete; | 908 ice_gathering_state_ = kIceGatheringComplete; |
| 908 observer_->OnIceGatheringChange(ice_gathering_state_); | 909 observer_->OnIceGatheringChange(ice_gathering_state_); |
| 909 } | 910 } |
| 910 } | 911 } |
| 911 observer_->OnSignalingChange(signaling_state_); | 912 observer_->OnSignalingChange(signaling_state_); |
| 912 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); | 913 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); |
| 913 } | 914 } |
| 914 | 915 |
| 915 } // namespace webrtc | 916 } // namespace webrtc |
| OLD | NEW |