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

Issue 1405963021: Add support for default local address in IpcNetworkManager (Closed)

Created:
5 years, 1 month ago by guoweis_left_chromium
Modified:
5 years, 1 month ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for default local address in IpcNetworkManager One of the modes of ip handling policy is to allow the associated default local address to be exposed along with the public interface. This requires Connect() to a public server (using the same ones from WebRTC) and GetLocalAddress() from a UDP socket. (Similar to https://code.google.com/p/chromium/codesearch#chromium/src/net/dns/host_resolver_impl.cc&rcl=1446089237&l=195) This mode will also be in effect when permission check on mic/camera fails or not involved (like a data channel). Default local address is really a global property of a network configuration, instead of individual network. They are most likely changed when interface changes. (Yes, people with admin right could change the routing table which changes the default local interface without network configuration change but I consider it is rare and not a supported scenario) This depends on the ongoing CL: https://codereview.webrtc.org/1411253008 BUG=webrtc:5061 Committed: https://crrev.com/a8c3d89c8fbbb8910665f194efe33747cd5b6d48 Cr-Commit-Position: refs/heads/master@{#359360}

Patch Set 1 #

Patch Set 2 : clean up the code. #

Patch Set 3 : update test cases. #

Total comments: 18

Patch Set 4 : address Sergey's comments #

Total comments: 1

Patch Set 5 : IPAddressNumberToIPAddress. #

Total comments: 4

Patch Set 6 : address comments. #

Total comments: 6

Patch Set 7 : remove redundancy. #

Patch Set 8 : fix a sizeof #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -48 lines) Patch
M content/browser/renderer_host/p2p/socket_dispatcher_host.h View 1 2 3 2 chunks +11 lines, -1 line 0 comments Download
M content/browser/renderer_host/p2p/socket_dispatcher_host.cc View 1 2 3 3 chunks +58 lines, -4 lines 0 comments Download
M content/common/p2p_messages.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M content/renderer/media/webrtc/peer_connection_dependency_factory.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/p2p/empty_network_manager.h View 3 chunks +12 lines, -1 line 0 comments Download
M content/renderer/p2p/empty_network_manager.cc View 2 chunks +8 lines, -1 line 0 comments Download
M content/renderer/p2p/filtering_network_manager.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/p2p/filtering_network_manager.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/p2p/filtering_network_manager_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/p2p/ipc_network_manager.h View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M content/renderer/p2p/ipc_network_manager.cc View 1 2 3 4 5 6 4 chunks +35 lines, -30 lines 0 comments Download
M content/renderer/p2p/ipc_network_manager_unittest.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/p2p/network_list_observer.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M content/renderer/p2p/socket_dispatcher.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M content/renderer/p2p/socket_dispatcher.cc View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M jingle/glue/utils.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M jingle/glue/utils.cc View 1 2 3 4 5 6 7 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (11 generated)
guoweis_webrtc
wfh@chromium.org: Please review changes in p2p_message.h sergeyu@chromium.org: Please review changes in the rest.
5 years, 1 month ago (2015-11-10 21:55:32 UTC) #4
Sergey Ulanov
https://codereview.chromium.org/1405963021/diff/60001/content/browser/renderer_host/p2p/socket_dispatcher_host.cc File content/browser/renderer_host/p2p/socket_dispatcher_host.cc (right): https://codereview.chromium.org/1405963021/diff/60001/content/browser/renderer_host/p2p/socket_dispatcher_host.cc#newcode355 content/browser/renderer_host/p2p/socket_dispatcher_host.cc:355: // Please see crbug.com/455942. We want to make sure ...
5 years, 1 month ago (2015-11-10 22:44:17 UTC) #8
guoweis_webrtc
PTAL. https://codereview.chromium.org/1405963021/diff/60001/content/browser/renderer_host/p2p/socket_dispatcher_host.cc File content/browser/renderer_host/p2p/socket_dispatcher_host.cc (right): https://codereview.chromium.org/1405963021/diff/60001/content/browser/renderer_host/p2p/socket_dispatcher_host.cc#newcode355 content/browser/renderer_host/p2p/socket_dispatcher_host.cc:355: // Please see crbug.com/455942. We want to make ...
5 years, 1 month ago (2015-11-11 00:11:51 UTC) #9
guoweis_webrtc
On 2015/11/11 00:11:51, guoweis wrote: > PTAL. > > https://codereview.chromium.org/1405963021/diff/60001/content/browser/renderer_host/p2p/socket_dispatcher_host.cc > File content/browser/renderer_host/p2p/socket_dispatcher_host.cc (right): > ...
5 years, 1 month ago (2015-11-11 18:14:16 UTC) #11
Sergey Ulanov
please upload the latest patchset
5 years, 1 month ago (2015-11-11 18:23:48 UTC) #12
Sergey Ulanov
https://codereview.chromium.org/1405963021/diff/100001/content/renderer/p2p/ipc_network_manager.cc File content/renderer/p2p/ipc_network_manager.cc (right): https://codereview.chromium.org/1405963021/diff/100001/content/renderer/p2p/ipc_network_manager.cc#newcode85 content/renderer/p2p/ipc_network_manager.cc:85: rtc::IPFromString(net::IPAddressToString(default_ipv4_local_address), Using strings to convert address types may be ...
5 years, 1 month ago (2015-11-11 18:56:33 UTC) #13
Sergey Ulanov
https://codereview.chromium.org/1405963021/diff/140001/content/renderer/p2p/ipc_network_manager.cc File content/renderer/p2p/ipc_network_manager.cc (right): https://codereview.chromium.org/1405963021/diff/140001/content/renderer/p2p/ipc_network_manager.cc#newcode97 content/renderer/p2p/ipc_network_manager.cc:97: if (!jingle_glue::IPAddressNumberToIPAddress(it->address, &ip_address)) This line is duplicated for ipv6 ...
5 years, 1 month ago (2015-11-11 21:10:03 UTC) #15
guoweis_webrtc
PTAL.
5 years, 1 month ago (2015-11-11 22:04:47 UTC) #16
Will Harris
content/common/p2p_messages.h security lgtm - message from browser to renderer with fully validated fields.
5 years, 1 month ago (2015-11-11 22:38:33 UTC) #17
Sergey Ulanov
https://codereview.chromium.org/1405963021/diff/160001/content/renderer/p2p/ipc_network_manager.cc File content/renderer/p2p/ipc_network_manager.cc (right): https://codereview.chromium.org/1405963021/diff/160001/content/renderer/p2p/ipc_network_manager.cc#newcode84 content/renderer/p2p/ipc_network_manager.cc:84: rtc::IPAddress ipv4 = nit: Don't think you need these ...
5 years, 1 month ago (2015-11-11 23:23:26 UTC) #18
guoweis_webrtc
On 2015/11/11 23:23:26, Sergey Ulanov wrote: > https://codereview.chromium.org/1405963021/diff/160001/content/renderer/p2p/ipc_network_manager.cc > File content/renderer/p2p/ipc_network_manager.cc (right): > > https://codereview.chromium.org/1405963021/diff/160001/content/renderer/p2p/ipc_network_manager.cc#newcode84 ...
5 years, 1 month ago (2015-11-11 23:42:22 UTC) #19
guoweis_webrtc
https://codereview.chromium.org/1405963021/diff/160001/content/renderer/p2p/ipc_network_manager.cc File content/renderer/p2p/ipc_network_manager.cc (right): https://codereview.chromium.org/1405963021/diff/160001/content/renderer/p2p/ipc_network_manager.cc#newcode84 content/renderer/p2p/ipc_network_manager.cc:84: rtc::IPAddress ipv4 = On 2015/11/11 23:23:26, Sergey Ulanov wrote: ...
5 years, 1 month ago (2015-11-11 23:42:31 UTC) #20
Sergey Ulanov
lgtm
5 years, 1 month ago (2015-11-12 18:24:43 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405963021/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405963021/200001
5 years, 1 month ago (2015-11-12 18:36:51 UTC) #25
commit-bot: I haz the power
Committed patchset #8 (id:200001)
5 years, 1 month ago (2015-11-12 19:40:29 UTC) #26
commit-bot: I haz the power
5 years, 1 month ago (2015-11-12 20:09:07 UTC) #27
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/a8c3d89c8fbbb8910665f194efe33747cd5b6d48
Cr-Commit-Position: refs/heads/master@{#359360}

Powered by Google App Engine
This is Rietveld 408576698