Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Side by Side Diff: webrtc/p2p/client/basicportallocator.cc

Issue 1303393002: Reland "Remove GICE (gone forever!) and PORTALLOCATOR_ENABLE_SHARED_UFRAG (enabled forever)." becau… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add memcheck suppression Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/turnport_unittest.cc ('k') | webrtc/p2p/client/connectivitychecker.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 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 ip_(network->GetBestIP()), 685 ip_(network->GetBestIP()),
686 config_(config), 686 config_(config),
687 state_(kInit), 687 state_(kInit),
688 flags_(flags), 688 flags_(flags),
689 udp_socket_(), 689 udp_socket_(),
690 udp_port_(NULL), 690 udp_port_(NULL),
691 phase_(0) { 691 phase_(0) {
692 } 692 }
693 693
694 bool AllocationSequence::Init() { 694 bool AllocationSequence::Init() {
695 if (IsFlagSet(PORTALLOCATOR_ENABLE_SHARED_SOCKET) &&
696 !IsFlagSet(PORTALLOCATOR_ENABLE_SHARED_UFRAG)) {
697 LOG(LS_ERROR) << "Shared socket option can't be set without "
698 << "shared ufrag.";
699 ASSERT(false);
700 return false;
701 }
702
703 if (IsFlagSet(PORTALLOCATOR_ENABLE_SHARED_SOCKET)) { 695 if (IsFlagSet(PORTALLOCATOR_ENABLE_SHARED_SOCKET)) {
704 udp_socket_.reset(session_->socket_factory()->CreateUdpSocket( 696 udp_socket_.reset(session_->socket_factory()->CreateUdpSocket(
705 rtc::SocketAddress(ip_, 0), session_->allocator()->min_port(), 697 rtc::SocketAddress(ip_, 0), session_->allocator()->min_port(),
706 session_->allocator()->max_port())); 698 session_->allocator()->max_port()));
707 if (udp_socket_) { 699 if (udp_socket_) {
708 udp_socket_->SignalReadPacket.connect( 700 udp_socket_->SignalReadPacket.connect(
709 this, &AllocationSequence::OnReadPacket); 701 this, &AllocationSequence::OnReadPacket);
710 } 702 }
711 // Continuing if |udp_socket_| is NULL, as local TCP and RelayPort using TCP 703 // Continuing if |udp_socket_| is NULL, as local TCP and RelayPort using TCP
712 // are next available options to setup a communication channel. 704 // are next available options to setup a communication channel.
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 ServerAddresses servers; 1133 ServerAddresses servers;
1142 for (size_t i = 0; i < relays.size(); ++i) { 1134 for (size_t i = 0; i < relays.size(); ++i) {
1143 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { 1135 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) {
1144 servers.insert(relays[i].ports.front().address); 1136 servers.insert(relays[i].ports.front().address);
1145 } 1137 }
1146 } 1138 }
1147 return servers; 1139 return servers;
1148 } 1140 }
1149 1141
1150 } // namespace cricket 1142 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/turnport_unittest.cc ('k') | webrtc/p2p/client/connectivitychecker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698