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

Unified Diff: content/browser/renderer_host/p2p/socket_dispatcher_host.h

Issue 1405963021: Add support for default local address in IpcNetworkManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test cases. Created 5 years, 1 month 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
Index: content/browser/renderer_host/p2p/socket_dispatcher_host.h
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.h b/content/browser/renderer_host/p2p/socket_dispatcher_host.h
index 18b18df22721a047bd76d035057fe2e4f81d816a..c875f3538cfa385e7f58ffd183715b3ad45ec18c 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.h
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.h
@@ -90,7 +90,14 @@ class P2PSocketDispatcherHost
void OnDestroySocket(int socket_id);
void DoGetNetworkList();
- void SendNetworkList(const net::NetworkInterfaceList& list);
+ void SendNetworkList(const net::NetworkInterfaceList& list,
+ const net::IPEndPoint& default_ipv4_local_address,
+ const net::IPEndPoint& default_ipv6_local_address);
+
+ // This connects a UDP socket to a public IP address and gets local
+ // address. Since it binds to the "any" address (0.0.0.0 or ::) internally, it
+ // retrieves the default local address.
+ net::IPEndPoint GetDefaultLocalAddress(int family);
void OnAddressResolved(DnsRequest* request,
const net::IPAddressList& addresses);
@@ -107,6 +114,8 @@ class P2PSocketDispatcherHost
std::set<DnsRequest*> dns_requests_;
P2PMessageThrottler throttler_;
+ net::IPEndPoint default_ipv4_local_address_, default_ipv6_local_address_;
Sergey Ulanov 2015/11/10 22:44:17 nit: Please separate these into two lines for read
guoweis_webrtc 2015/11/11 00:11:51 Done.
+
bool dump_incoming_rtp_packet_;
bool dump_outgoing_rtp_packet_;
RenderProcessHost::WebRtcRtpPacketCallback packet_callback_;

Powered by Google App Engine
This is Rietveld 408576698