// See the description of NetworkChangeNotifier::GetConnectionType().
// Implementations must be thread-safe. Implementations must also be
- // cheap as this could be called (repeatedly) from the network thread.
+ // cheap as it is called often.
virtual ConnectionType GetCurrentConnectionType() const = 0;
// Replaces the default class factory instance of NetworkChangeNotifier class.
// the internet, the connection type is CONNECTION_WIFI.
static ConnectionType GetConnectionType();
+ // Returns a theoretical upper limit on download bandwidth, potentially based
+ // on underlying connection type, signal strength, or some other signal. The
+ // default mapping of connection type to maximum bandwidth is provided in the
+ // NetInfo spec: http://w3c.github.io/netinfo/.
+ static double GetMaxBandwidth();
+
// Retrieve the last read DnsConfig. This could be expensive if the system has
// a large HOSTS file.
static void GetDnsConfig(DnsConfig* config);
GetAddressTrackerInternal() const;
#endif
+ // See the description of NetworkChangeNotifier::GetMaxBandwidth().
+ // Implementations must be thread-safe. Implementations must also be
+ // cheap as it is called often.
+ virtual double GetCurrentMaxBandwidth() const;
+
// Broadcasts a notification to all registered observers. Note that this
// happens asynchronously, even for observers on the current thread, even in
// tests.