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

Unified Diff: webrtc/base/network.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
Index: webrtc/base/network.cc
diff --git a/webrtc/base/network.cc b/webrtc/base/network.cc
index 2081c94e2c767f626b77920e8b2dd8799d6a1c98..3a9b5dc5a2f16ad74956fa2ec6199b704df17636 100644
--- a/webrtc/base/network.cc
+++ b/webrtc/base/network.cc
@@ -164,7 +164,9 @@ NetworkManager::~NetworkManager() {
}
NetworkManagerBase::NetworkManagerBase()
- : max_ipv6_networks_(kMaxIPv6Networks), ipv6_enabled_(true) {
+ : network_permission_state_(NetworkManager::STATE_UNKNOWN),
+ max_ipv6_networks_(kMaxIPv6Networks),
+ ipv6_enabled_(true) {
}
NetworkManagerBase::~NetworkManagerBase() {
@@ -173,6 +175,11 @@ NetworkManagerBase::~NetworkManagerBase() {
}
}
+NetworkManager::NetworkPermissionState
+NetworkManagerBase::network_permission_state() const {
+ return network_permission_state_;
+}
+
void NetworkManagerBase::GetAnyAddressNetworks(NetworkList* networks) {
if (!ipv4_any_address_network_) {
const rtc::IPAddress ipv4_any_address(INADDR_ANY);
@@ -306,6 +313,8 @@ void NetworkManagerBase::MergeNetworkList(const NetworkList& new_networks,
}
}
}
+
+ network_permission_state_ = STATE_ALLOWED;
pthatcher1 2015/08/18 18:34:19 I don't understand. Why is it not allowed until a
juberti1 2015/08/20 06:31:04 I'm not sure we know if it's allowed initially.
pthatcher1 2015/08/20 06:43:36 Outside of Chrome it is. Chrome can change the st
}
BasicNetworkManager::BasicNetworkManager()
@@ -664,6 +673,7 @@ void BasicNetworkManager::StopUpdating() {
if (!start_count_) {
thread_->Clear(this);
sent_first_update_ = false;
+ set_network_permission_state(NetworkManager::STATE_UNKNOWN);
pthatcher1 2015/08/18 18:34:19 Why does the permission state change when we stop
}
}

Powered by Google App Engine
This is Rietveld 408576698