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

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: Fixes 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
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..78223f5532356126e72ac0c62c3810612695a308 100644
--- a/net/base/network_change_notifier_mac.cc
+++ b/net/base/network_change_notifier_mac.cc
@@ -257,8 +257,16 @@ 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 =
+ new_type == CONNECTION_NONE
+ ? NetworkChangeNotifier::GetMaxBandwidthForConnectionSubtype(
pauljensen 2015/09/15 18:17:40 ditto
jkarlin 2015/09/16 12:12:22 Done.
+ SUBTYPE_NONE)
+ : NetworkChangeNotifier::GetMaxBandwidthForConnectionSubtype(
+ SUBTYPE_UNKNOWN);
+ NotifyObserversOfMaxBandwidthChange(new_type, max_bandwidth);
+ }
#if defined(OS_IOS)
// On iOS, the SCDynamicStore API does not exist, and we use the reachability

Powered by Google App Engine
This is Rietveld 408576698