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

Unified Diff: net/base/network_change_notifier.h

Issue 2776523003: Expose connection subtype from NetworkChangeNotifier (Closed)
Patch Set: ps Created 3 years, 9 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 | « net/android/network_change_notifier_android.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier.h
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index 1cefe85ff6e15b29af41828e90157e4bd81b15d6..e71b7b3a1e832cf80427a94f18c8cf3c23e92d1e 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -276,6 +276,13 @@ class NET_EXPORT NetworkChangeNotifier {
// the internet, the connection type is CONNECTION_WIFI.
static ConnectionType GetConnectionType();
+ // Returns the connection subtype of the network the client is connected to.
pauljensen 2017/03/24 18:38:58 "the connection subtype of the network the client
tbansal1 2017/03/24 23:22:24 Done.
+ // The returned value only describes the connection currently used by the
+ // device, and does not take into account other machines on the network. For
+ // example, if the device is connected using Wifi to a 3G gateway to access
+ // the internet, the connection type is CONNECTION_WIFI.
pauljensen 2017/03/24 18:38:58 there is no sub-type for WiFi
pauljensen 2017/03/24 18:38:59 The returned value only describes the connection c
tbansal1 2017/03/24 23:22:24 Thanks, I am more interested in cellular. If it pr
tbansal1 2017/03/24 23:22:24 Done.
+ static ConnectionSubtype GetConnectionSubtype();
+
// Sets |max_bandwidth_mbps| to a theoretical upper limit on download
// bandwidth, potentially based on underlying connection type, signal
// strength, or some other signal. If the network subtype is unknown then
@@ -498,6 +505,7 @@ class NET_EXPORT NetworkChangeNotifier {
// Implementations must be thread-safe. Implementations must also be
// cheap as they are called often.
virtual ConnectionType GetCurrentConnectionType() const = 0;
+ virtual ConnectionSubtype GetCurrentConnectionSubtype() const;
virtual void GetCurrentMaxBandwidthAndConnectionType(
double* max_bandwidth_mbps,
ConnectionType* connection_type) const;
« no previous file with comments | « net/android/network_change_notifier_android.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698