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

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

Issue 1520963002: Removing webrtc::PortAllocatorFactoryInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing patch conflicts 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 26 matching lines...) Expand all
37 const rtc::SocketAddress& relay_server_ssl); 37 const rtc::SocketAddress& relay_server_ssl);
38 virtual ~BasicPortAllocator(); 38 virtual ~BasicPortAllocator();
39 39
40 void SetIceServers( 40 void SetIceServers(
41 const ServerAddresses& stun_servers, 41 const ServerAddresses& stun_servers,
42 const std::vector<RelayServerConfig>& turn_servers) override { 42 const std::vector<RelayServerConfig>& turn_servers) override {
43 stun_servers_ = stun_servers; 43 stun_servers_ = stun_servers;
44 turn_servers_ = turn_servers; 44 turn_servers_ = turn_servers;
45 } 45 }
46 46
47 // Set to kDefaultNetworkIgnoreMask by default.
48 void SetNetworkIgnoreMask(int network_ignore_mask) override {
49 // TODO(phoglund): implement support for other types than loopback.
50 // See https://code.google.com/p/webrtc/issues/detail?id=4288.
51 // Then remove set_network_ignore_list from NetworkManager.
52 network_ignore_mask_ = network_ignore_mask;
53 }
54
55 int network_ignore_mask() const { return network_ignore_mask_; }
56
47 rtc::NetworkManager* network_manager() { return network_manager_; } 57 rtc::NetworkManager* network_manager() { return network_manager_; }
48 58
49 // If socket_factory() is set to NULL each PortAllocatorSession 59 // If socket_factory() is set to NULL each PortAllocatorSession
50 // creates its own socket factory. 60 // creates its own socket factory.
51 rtc::PacketSocketFactory* socket_factory() { return socket_factory_; } 61 rtc::PacketSocketFactory* socket_factory() { return socket_factory_; }
52 62
53 const ServerAddresses& stun_servers() const { 63 const ServerAddresses& stun_servers() const {
54 return stun_servers_; 64 return stun_servers_;
55 } 65 }
56 66
(...skipping 11 matching lines...) Expand all
68 const std::string& ice_pwd) override; 78 const std::string& ice_pwd) override;
69 79
70 private: 80 private:
71 void Construct(); 81 void Construct();
72 82
73 rtc::NetworkManager* network_manager_; 83 rtc::NetworkManager* network_manager_;
74 rtc::PacketSocketFactory* socket_factory_; 84 rtc::PacketSocketFactory* socket_factory_;
75 ServerAddresses stun_servers_; 85 ServerAddresses stun_servers_;
76 std::vector<RelayServerConfig> turn_servers_; 86 std::vector<RelayServerConfig> turn_servers_;
77 bool allow_tcp_listen_; 87 bool allow_tcp_listen_;
88 int network_ignore_mask_ = rtc::kDefaultNetworkIgnoreMask;
78 }; 89 };
79 90
80 struct PortConfiguration; 91 struct PortConfiguration;
81 class AllocationSequence; 92 class AllocationSequence;
82 93
83 class BasicPortAllocatorSession : public PortAllocatorSession, 94 class BasicPortAllocatorSession : public PortAllocatorSession,
84 public rtc::MessageHandler { 95 public rtc::MessageHandler {
85 public: 96 public:
86 BasicPortAllocatorSession(BasicPortAllocator* allocator, 97 BasicPortAllocatorSession(BasicPortAllocator* allocator,
87 const std::string& content_name, 98 const std::string& content_name,
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 rtc::scoped_ptr<rtc::AsyncPacketSocket> udp_socket_; 323 rtc::scoped_ptr<rtc::AsyncPacketSocket> udp_socket_;
313 // There will be only one udp port per AllocationSequence. 324 // There will be only one udp port per AllocationSequence.
314 UDPPort* udp_port_; 325 UDPPort* udp_port_;
315 std::vector<TurnPort*> turn_ports_; 326 std::vector<TurnPort*> turn_ports_;
316 int phase_; 327 int phase_;
317 }; 328 };
318 329
319 } // namespace cricket 330 } // namespace cricket
320 331
321 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ 332 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698