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

Unified Diff: webrtc/base/network.h

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
« no previous file with comments | « no previous file | webrtc/p2p/client/basicportallocator.cc » ('j') | webrtc/p2p/client/basicportallocator.cc » ('J')
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 8e5c8f0fb70e196acb1bab84321f1aa63812bf96..2e93fd5037899011c5194f3a9bb8a99738649086 100644
--- a/webrtc/base/network.h
+++ b/webrtc/base/network.h
@@ -73,12 +73,20 @@ class NetworkManager {
virtual void StopUpdating() = 0;
// Returns the current list of networks available on this machine.
- // UpdateNetworks() must be called before this method is called.
+ // StartUpdating() must be called before this method is called.
// It makes sure that repeated calls return the same object for a
// given network, so that quality is tracked appropriately. Does not
// include ignored networks.
virtual void GetNetworks(NetworkList* networks) const = 0;
juberti1 2015/08/13 20:45:58 suggest that GetNetworks return a bool so that you
guoweis_webrtc 2015/08/13 20:54:14 Do you mean returning false here to reprenset the
juberti1 2015/08/13 22:10:11 yes, or any other sort of error occurred. The API
guoweis_webrtc 2015/08/13 22:49:36 there are existing override in chromium which prev
juberti1 2015/08/13 23:05:27 If you have to add a new function, I suggest addin
+ // When this returns true, GetNetworks will not return any networks.
+ // GetAnyAddressNetworks should be used to retrieve the any address
+ // This function should only be called after SignalNetworksChanged is
+ // first signaled.
+ virtual bool adapter_enumeration_disabled() const {
juberti1 2015/08/13 20:45:58 If it's virtual, typically it won't have the all-l
guoweis_webrtc 2015/08/13 20:54:14 I think "can_get_networks" doesn't seem to convey
juberti1 2015/08/13 22:10:11 If enumeration is disabled, can_get_networks will
guoweis_webrtc 2015/08/13 22:49:36 I'll just use RetrieveNetworks, instead of introdu
+ return false;
+ }
+
// "AnyAddressNetwork" is a network which only contains single "any address"
// IP address. (i.e. INADDR_ANY for IPv4 or in6addr_any for IPv6). This is
// useful as binding to such interfaces allow default routing behavior like
« no previous file with comments | « no previous file | webrtc/p2p/client/basicportallocator.cc » ('j') | webrtc/p2p/client/basicportallocator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698