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

Unified Diff: net/base/network_change_notifier_mac.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 | « net/base/network_change_notifier_linux.cc ('k') | net/base/network_change_notifier_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier_mac.cc
diff --git a/net/base/network_change_notifier_mac.cc b/net/base/network_change_notifier_mac.cc
index f8caee80f6584ca5730d9c84d8deb16879d1ce9b..4468c0bc226112d28b2b795d4bebec0bacdb8c94 100644
--- a/net/base/network_change_notifier_mac.cc
+++ b/net/base/network_change_notifier_mac.cc
@@ -257,8 +257,13 @@ void NetworkChangeNotifierMac::ReachabilityCallback(
old_type = notifier_mac->connection_type_;
notifier_mac->connection_type_ = new_type;
}
- if (old_type != new_type)
+ if (old_type != new_type) {
NotifyObserversOfConnectionTypeChange();
+ double max_bandwidth_mbps =
+ NetworkChangeNotifier::GetMaxBandwidthForConnectionSubtype(
+ new_type == CONNECTION_NONE ? SUBTYPE_NONE : SUBTYPE_UNKNOWN);
+ NotifyObserversOfMaxBandwidthChange(max_bandwidth_mbps, new_type);
+ }
#if defined(OS_IOS)
// On iOS, the SCDynamicStore API does not exist, and we use the reachability
« no previous file with comments | « net/base/network_change_notifier_linux.cc ('k') | net/base/network_change_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698