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

Unified Diff: net/android/network_change_notifier_android.cc

Issue 780293003: [NetInfo] Add MaxBandwidthChanged notification and implement on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maxbandwidth_android
Patch Set: Don't monitor RSSI if there is no permission to act on it Created 6 years 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
Index: net/android/network_change_notifier_android.cc
diff --git a/net/android/network_change_notifier_android.cc b/net/android/network_change_notifier_android.cc
index 2063e7b017236f549afa1eec9ac88d4829d293d7..05f8a6b884746dcc98344ba53cff21ed8cc7537a 100644
--- a/net/android/network_change_notifier_android.cc
+++ b/net/android/network_change_notifier_android.cc
@@ -97,6 +97,11 @@ class NetworkChangeNotifierAndroid::DnsConfigServiceThread
NetworkChangeNotifier::NotifyObserversOfConnectionTypeChange();
}
+ static void NotifyMaxBandwidthChangedObservers(double max_bandwidth_mbps) {
pauljensen 2014/12/11 16:13:56 Can we remove this function? I don't see a reason
jkarlin 2014/12/15 19:43:55 Done.
+ NetworkChangeNotifier::NotifyObserversOfMaxBandwidthChange(
+ max_bandwidth_mbps);
+ }
+
private:
scoped_ptr<DnsConfigService> dns_config_service_;
// Used to detect tunnel state changes.
@@ -122,6 +127,12 @@ void NetworkChangeNotifierAndroid::OnConnectionTypeChanged() {
DnsConfigServiceThread::NotifyNetworkChangeNotifierObservers();
}
+void NetworkChangeNotifierAndroid::OnMaxBandwidthChanged(
+ double max_bandwidth_mbps) {
+ DnsConfigServiceThread::NotifyMaxBandwidthChangedObservers(
+ max_bandwidth_mbps);
+}
+
// static
bool NetworkChangeNotifierAndroid::Register(JNIEnv* env) {
return NetworkChangeNotifierDelegateAndroid::Register(env);

Powered by Google App Engine
This is Rietveld 408576698