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

Unified Diff: webrtc/base/network.h

Issue 1696933003: When doing continual gathering, remove local candidates when a network is dropped. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix a type conversion error on Windows Created 4 years, 10 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
« no previous file with comments | « no previous file | webrtc/base/network.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/network.h
diff --git a/webrtc/base/network.h b/webrtc/base/network.h
index 10ce6f0e01dc1d8a324ddd15a576cdd9b4dc077b..a81bcabf660346f34d941a11494720b094084f58 100644
--- a/webrtc/base/network.h
+++ b/webrtc/base/network.h
@@ -265,6 +265,8 @@ class Network {
AdapterType type);
~Network();
+ sigslot::signal1<const Network*> SignalInactive;
+
const DefaultLocalAddressProvider* default_local_address_provider() {
return default_local_address_provider_;
}
@@ -342,7 +344,15 @@ class Network {
// we do not remove it (because it may be used elsewhere). Instead, we mark
// it inactive, so that we can detect network changes properly.
bool active() const { return active_; }
- void set_active(bool active) { active_ = active; }
+ void set_active(bool active) {
+ if (active_ == active) {
+ return;
+ }
+ active_ = active;
+ if (!active) {
+ SignalInactive(this);
+ }
+ }
// Debugging description of this network
std::string ToString() const;
« no previous file with comments | « no previous file | webrtc/base/network.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698