 Chromium Code Reviews
 Chromium Code Reviews Issue 1284113003:
  Move the concept of multiple route into Network  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc@master
    
  
    Issue 1284113003:
  Move the concept of multiple route into Network  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc@master| Index: webrtc/p2p/client/basicportallocator.cc | 
| diff --git a/webrtc/p2p/client/basicportallocator.cc b/webrtc/p2p/client/basicportallocator.cc | 
| index c5cfbd94a154940b6a92eb84337ab19fe02ab7dc..321621b9978bfe7f3fb74860478fc18504204abd 100644 | 
| --- a/webrtc/p2p/client/basicportallocator.cc | 
| +++ b/webrtc/p2p/client/basicportallocator.cc | 
| @@ -304,6 +304,17 @@ void BasicPortAllocatorSession::DoAllocate() { | 
| bool done_signal_needed = false; | 
| std::vector<rtc::Network*> networks; | 
| + // SignalNetworksChanged should have been fired when we are here. | 
| + DCHECK(allocator_->network_manager()->network_permission_state() != | 
| + rtc::NetworkManager::STATE_UNKNOWN); | 
| + | 
| + // If the network permission state is BLOCKED, we just act as if the flag has | 
| + // been passed in. | 
| + if (allocator_->network_manager()->network_permission_state() == | 
| + rtc::NetworkManager::STATE_BLOCKED) { | 
| 
pthatcher1
2015/08/18 18:34:20
In a release build, we would grant access if in th
 | 
| + set_flags(flags() | PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION); | 
| 
pthatcher1
2015/08/18 18:34:20
So what if the the permission changes?  Should we
 | 
| + } | 
| 
pthatcher1
2015/08/18 18:47:59
Can you add a unit test for this?
 | 
| + | 
| // If the adapter enumeration is disabled, we'll just bind to any address | 
| // instead of specific NIC. This is to ensure the same routing for http | 
| // traffic by OS is also used here to avoid any local or public IP leakage |