| Index: net/android/network_change_notifier_delegate_android.cc
|
| diff --git a/net/android/network_change_notifier_delegate_android.cc b/net/android/network_change_notifier_delegate_android.cc
|
| index ec8a7294995876b4ca09150171f0d1263d97d3f2..9eb357eaa353266d3b9618359b54fb0e0ada55a8 100644
|
| --- a/net/android/network_change_notifier_delegate_android.cc
|
| +++ b/net/android/network_change_notifier_delegate_android.cc
|
| @@ -84,8 +84,12 @@ NetworkChangeNotifierDelegateAndroid::GetCurrentConnectionType() const {
|
| return connection_type_;
|
| }
|
|
|
| -double NetworkChangeNotifierDelegateAndroid::GetCurrentMaxBandwidth() const {
|
| +double
|
| +NetworkChangeNotifierDelegateAndroid::GetCurrentMaxBandwidthAndConnectionType(
|
| + ConnectionType* connection_type) const {
|
| base::AutoLock auto_lock(connection_lock_);
|
| + if (connection_type != nullptr)
|
| + *connection_type = connection_type_;
|
| return connection_max_bandwidth_;
|
| }
|
|
|
| @@ -111,10 +115,11 @@ void NetworkChangeNotifierDelegateAndroid::NotifyMaxBandwidthChanged(
|
| jobject obj,
|
| jdouble new_max_bandwidth) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| - DCHECK(new_max_bandwidth != GetCurrentMaxBandwidth());
|
| + DCHECK(new_max_bandwidth != GetCurrentMaxBandwidthAndConnectionType(nullptr));
|
| +
|
| SetCurrentMaxBandwidth(new_max_bandwidth);
|
| observers_->Notify(FROM_HERE, &Observer::OnMaxBandwidthChanged,
|
| - new_max_bandwidth);
|
| + GetCurrentConnectionType(), new_max_bandwidth);
|
| }
|
|
|
| void NetworkChangeNotifierDelegateAndroid::AddObserver(
|
|
|