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

Unified Diff: webrtc/p2p/client/basicportallocator.cc

Issue 1284113003: Move the concept of multiple route into Network (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
« webrtc/base/network_unittest.cc ('K') | « webrtc/base/network_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
+ set_flags(flags() | PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION);
+ }
+
// 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
« webrtc/base/network_unittest.cc ('K') | « webrtc/base/network_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698