Chromium Code Reviews| Index: webrtc/base/network.h |
| diff --git a/webrtc/base/network.h b/webrtc/base/network.h |
| index 8980b5d57d8ecb4fda77c064335a7d3ab881383a..f492944f595fd178472d74ba322d67bb1945d14f 100644 |
| --- a/webrtc/base/network.h |
| +++ b/webrtc/base/network.h |
| @@ -111,11 +111,10 @@ class NetworkManager : public DefaultLocalAddressProvider { |
| // TODO(guoweis): remove this body when chromium implements this. |
| virtual void GetAnyAddressNetworks(NetworkList* networks) {} |
| + // Dumps the current list of networks in the network manager. |
| + virtual void DumpNetworks() {} |
| bool GetDefaultLocalAddress(int family, IPAddress* ipaddr) const override; |
| - // Dumps a list of networks available to LS_INFO. |
| - virtual void DumpNetworks(bool include_ignored) {} |
| - |
| struct Stats { |
| int ipv4_network_count; |
| int ipv6_network_count; |
| @@ -195,8 +194,7 @@ class BasicNetworkManager : public NetworkManagerBase, |
| void StartUpdating() override; |
| void StopUpdating() override; |
| - // Logs the available networks. |
| - void DumpNetworks(bool include_ignored) override; |
| + void DumpNetworks() override; |
| // MessageHandler interface. |
| void OnMessage(Message* msg) override; |
| @@ -359,6 +357,11 @@ class Network { |
| int preference() const { return preference_; } |
| void set_preference(int preference) { preference_ = preference; } |
| + // A network becomes inactive if it is out of range or it is put into |
| + // a dormant state by the OS (to conserve energy). |
|
pthatcher1
2015/12/15 08:13:09
Would it make sense to say something like "when we
honghaiz3
2015/12/15 20:04:53
Done, with small changes.
|
| + bool active() const { return active_; } |
| + void set_active(bool active) { active_ = active; } |
| + |
| // Debugging description of this network |
| std::string ToString() const; |
| @@ -374,6 +377,7 @@ class Network { |
| bool ignored_; |
| AdapterType type_; |
| int preference_; |
| + bool active_ = true; |
| friend class NetworkManager; |
| }; |