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

Unified Diff: webrtc/base/networkmonitor.h

Issue 1594673002: Get the adapter type information from Android OS. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments Created 4 years, 11 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 | « webrtc/base/network_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/networkmonitor.h
diff --git a/webrtc/base/networkmonitor.h b/webrtc/base/networkmonitor.h
index dd15f6e8f7244226d40084a0742d0316be63f470..d9d6cc49d8745efa3b9313c79dfb81e6212d9e8a 100644
--- a/webrtc/base/networkmonitor.h
+++ b/webrtc/base/networkmonitor.h
@@ -29,6 +29,16 @@ enum NetworkBindingResults {
NETWORK_BIND_NETWORK_CHANGED = -4
};
+enum AdapterType {
+ // This enum resembles the one in Chromium net::ConnectionType.
+ ADAPTER_TYPE_UNKNOWN = 0,
+ ADAPTER_TYPE_ETHERNET = 1 << 0,
+ ADAPTER_TYPE_WIFI = 1 << 1,
+ ADAPTER_TYPE_CELLULAR = 1 << 2,
+ ADAPTER_TYPE_VPN = 1 << 3,
+ ADAPTER_TYPE_LOOPBACK = 1 << 4
+};
+
class NetworkBinderInterface {
public:
// Binds a socket to the network that is attached to |address| so that all
@@ -70,6 +80,8 @@ class NetworkMonitorInterface {
// Implementations should call this method on the base when networks change,
// and the base will fire SignalNetworksChanged on the right thread.
virtual void OnNetworksChanged() = 0;
+
+ virtual AdapterType GetAdapterType(const std::string& interface_name) = 0;
};
class NetworkMonitorBase : public NetworkMonitorInterface,
« no previous file with comments | « webrtc/base/network_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698