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

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

Issue 1520963002: Removing webrtc::PortAllocatorFactoryInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Using new CreatePeerConnection method in objc wrapper. Created 5 years 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
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 PORTALLOCATOR_DISABLE_UDP | PORTALLOCATOR_DISABLE_TCP | 63 PORTALLOCATOR_DISABLE_UDP | PORTALLOCATOR_DISABLE_TCP |
64 PORTALLOCATOR_DISABLE_STUN | PORTALLOCATOR_DISABLE_RELAY; 64 PORTALLOCATOR_DISABLE_STUN | PORTALLOCATOR_DISABLE_RELAY;
65 65
66 // BasicPortAllocator 66 // BasicPortAllocator
67 BasicPortAllocator::BasicPortAllocator( 67 BasicPortAllocator::BasicPortAllocator(
68 rtc::NetworkManager* network_manager, 68 rtc::NetworkManager* network_manager,
69 rtc::PacketSocketFactory* socket_factory) 69 rtc::PacketSocketFactory* socket_factory)
70 : network_manager_(network_manager), 70 : network_manager_(network_manager),
71 socket_factory_(socket_factory), 71 socket_factory_(socket_factory),
72 stun_servers_() { 72 stun_servers_() {
73 ASSERT(socket_factory_ != NULL); 73 ASSERT(network_manager_ != nullptr);
74 ASSERT(socket_factory_ != nullptr);
74 Construct(); 75 Construct();
75 } 76 }
76 77
77 BasicPortAllocator::BasicPortAllocator( 78 BasicPortAllocator::BasicPortAllocator(rtc::NetworkManager* network_manager)
78 rtc::NetworkManager* network_manager)
79 : network_manager_(network_manager), 79 : network_manager_(network_manager),
80 socket_factory_(NULL), 80 socket_factory_(nullptr),
81 stun_servers_() { 81 stun_servers_() {
82 ASSERT(network_manager_ != nullptr);
82 Construct(); 83 Construct();
83 } 84 }
84 85
85 BasicPortAllocator::BasicPortAllocator( 86 BasicPortAllocator::BasicPortAllocator(
86 rtc::NetworkManager* network_manager, 87 rtc::NetworkManager* network_manager,
87 rtc::PacketSocketFactory* socket_factory, 88 rtc::PacketSocketFactory* socket_factory,
88 const ServerAddresses& stun_servers) 89 const ServerAddresses& stun_servers)
89 : network_manager_(network_manager), 90 : network_manager_(network_manager),
90 socket_factory_(socket_factory), 91 socket_factory_(socket_factory),
91 stun_servers_(stun_servers) { 92 stun_servers_(stun_servers) {
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 ServerAddresses servers; 1178 ServerAddresses servers;
1178 for (size_t i = 0; i < relays.size(); ++i) { 1179 for (size_t i = 0; i < relays.size(); ++i) {
1179 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { 1180 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) {
1180 servers.insert(relays[i].ports.front().address); 1181 servers.insert(relays[i].ports.front().address);
1181 } 1182 }
1182 } 1183 }
1183 return servers; 1184 return servers;
1184 } 1185 }
1185 1186
1186 } // namespace cricket 1187 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698