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

Unified Diff: webrtc/base/network.h

Issue 1648813004: Remove candidates when doing continual gathering (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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
Index: webrtc/base/network.h
diff --git a/webrtc/base/network.h b/webrtc/base/network.h
index 2f2e1b3a45aaf3e3592a37374f149f63e4f4d4b2..b2adf160f2d6c5b3b4a8ba1b30482c24c46187d2 100644
--- a/webrtc/base/network.h
+++ b/webrtc/base/network.h
@@ -273,6 +273,8 @@ class Network {
AdapterType type);
~Network();
+ sigslot::signal1<const Network*> SignalInactive;
+
const DefaultLocalAddressProvider* default_local_address_provider() {
return default_local_address_provider_;
}
@@ -350,7 +352,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;

Powered by Google App Engine
This is Rietveld 408576698