Move the getUserMedia gating of mDNS protection to FilteringNetworkManager.

Our previous implementation would destroy the connection to the mDNS
responder service host when the media capture permission is granted.
As a result, any mDNS candidate created before the grant would become
unresolvable. This issue is particularly evident when we have multiple
peer connections of the same origin, where a newly created peer
connection would temporarily toggle the permission to blocked before
restoring the granted status if the user did give the permission. This
could cause a peer connection created earlier and in the process of ICE
candidate gathering to perform unnecessary mDNS obfuscation. After this
change, the connection to the mDNS responder service host keeps alive,
but just becomes unavailable for registration of new names when we have
permissions granted.

Bug: 930339, 937992
Change-Id: I8ccdf0e6b578bc9e327337c6fbd102cdc542d15c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1522687
Commit-Queue: Qingsi Wang <qingsi@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641046}
8 files changed