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

Unified Diff: webrtc/p2p/base/stunport.h

Issue 1275703006: Bug 4517: Enable connectivity for demo page when no STUN/TURN specifiefd. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/portallocator.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stunport.h
diff --git a/webrtc/p2p/base/stunport.h b/webrtc/p2p/base/stunport.h
index d840a97126b9e74b24ba5e0750da32821d6b4fdc..274f188f28ef33f42334044a3a8d28e080db6857 100644
--- a/webrtc/p2p/base/stunport.h
+++ b/webrtc/p2p/base/stunport.h
@@ -34,9 +34,11 @@ class UDPPort : public Port {
rtc::AsyncPacketSocket* socket,
const std::string& username,
const std::string& password,
- const std::string& origin) {
+ const std::string& origin,
+ bool emit_localhost_for_anyaddress) {
UDPPort* port = new UDPPort(thread, factory, network, socket,
- username, password, origin);
+ username, password, origin,
+ emit_localhost_for_anyaddress);
if (!port->Init()) {
delete port;
port = NULL;
@@ -52,10 +54,12 @@ class UDPPort : public Port {
uint16 max_port,
const std::string& username,
const std::string& password,
- const std::string& origin) {
+ const std::string& origin,
+ bool emit_localhost_for_anyaddress) {
UDPPort* port = new UDPPort(thread, factory, network,
ip, min_port, max_port,
- username, password, origin);
+ username, password, origin,
+ emit_localhost_for_anyaddress);
if (!port->Init()) {
delete port;
port = NULL;
@@ -110,7 +114,8 @@ class UDPPort : public Port {
uint16 max_port,
const std::string& username,
const std::string& password,
- const std::string& origin);
+ const std::string& origin,
+ bool emit_localhost_for_anyaddress);
UDPPort(rtc::Thread* thread,
rtc::PacketSocketFactory* factory,
@@ -118,7 +123,8 @@ class UDPPort : public Port {
rtc::AsyncPacketSocket* socket,
const std::string& username,
const std::string& password,
- const std::string& origin);
+ const std::string& origin,
+ bool emit_localhost_for_anyaddress);
bool Init();
@@ -202,6 +208,10 @@ class UDPPort : public Port {
bool ready_;
int stun_keepalive_delay_;
+ // This is true when no STUN or TURN is specified in AllocationSequence and
+ // PORTALLOCATOR_ENABLE_LOCALHOST_CANDIDATE is specified.
+ bool emit_localhost_for_anyaddress_;
+
friend class StunBindingRequest;
};
@@ -245,7 +255,7 @@ class StunPort : public UDPPort {
const ServerAddresses& servers,
const std::string& origin)
: UDPPort(thread, factory, network, ip, min_port, max_port, username,
- password, origin) {
+ password, origin, false) {
// UDPPort will set these to local udp, updating these to STUN.
set_type(STUN_PORT_TYPE);
set_server_addresses(servers);
« no previous file with comments | « webrtc/p2p/base/portallocator.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698