Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / net / base / network_change_notifier.h
index 46a4854..bdd2d18 100644 (file)
@@ -132,7 +132,7 @@ class NET_EXPORT NetworkChangeNotifier {
 
   // 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.
@@ -159,6 +159,12 @@ class NET_EXPORT NetworkChangeNotifier {
   // 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);
@@ -295,6 +301,11 @@ class NET_EXPORT NetworkChangeNotifier {
       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.