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

Unified Diff: chromeos/network/network_change_notifier_chromeos.cc

Issue 1306653003: Add connection type to NCN::MaxBandwidthChanged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra space in comment Created 5 years, 3 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 | « chromeos/network/network_change_notifier_chromeos.h ('k') | net/android/network_change_notifier_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_change_notifier_chromeos.cc
diff --git a/chromeos/network/network_change_notifier_chromeos.cc b/chromeos/network/network_change_notifier_chromeos.cc
index 52ee616a184938c032d185b6cbc694b5e43e2b66..a232997a4d4d4b83b05b2a64097bc168cc5c5fb2 100644
--- a/chromeos/network/network_change_notifier_chromeos.cc
+++ b/chromeos/network/network_change_notifier_chromeos.cc
@@ -102,8 +102,11 @@ NetworkChangeNotifierChromeos::GetCurrentConnectionType() const {
return connection_type_;
}
-double NetworkChangeNotifierChromeos::GetCurrentMaxBandwidth() const {
- return max_bandwidth_mbps_;
+void NetworkChangeNotifierChromeos::GetCurrentMaxBandwidthAndConnectionType(
+ double* max_bandwidth_mbps,
+ ConnectionType* connection_type) const {
+ *connection_type = connection_type_;
+ *max_bandwidth_mbps = max_bandwidth_mbps_;
}
void NetworkChangeNotifierChromeos::SuspendDone(
@@ -129,9 +132,10 @@ void NetworkChangeNotifierChromeos::DefaultNetworkChanged(
NetworkChangeNotifier::NotifyObserversOfIPAddressChange();
if (dns_changed)
dns_config_service_->OnNetworkChange();
- if (max_bandwidth_changed)
+ if (max_bandwidth_changed || connection_type_changed) {
NetworkChangeNotifier::NotifyObserversOfMaxBandwidthChange(
- max_bandwidth_mbps_);
+ max_bandwidth_mbps_, connection_type_);
+ }
}
void NetworkChangeNotifierChromeos::UpdateState(
« no previous file with comments | « chromeos/network/network_change_notifier_chromeos.h ('k') | net/android/network_change_notifier_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698