| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 //////////////////////////////////////////////////////////////////////////////// | 5 //////////////////////////////////////////////////////////////////////////////// |
| 6 // Threading considerations: | 6 // Threading considerations: |
| 7 // | 7 // |
| 8 // This class is designed to meet various threading guarantees starting from the | 8 // This class is designed to meet various threading guarantees starting from the |
| 9 // ones imposed by NetworkChangeNotifier: | 9 // ones imposed by NetworkChangeNotifier: |
| 10 // - The notifier can be constructed on any thread. | 10 // - The notifier can be constructed on any thread. |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 NetworkChangeNotifierAndroid::GetCurrentNetworkConnectionType( | 188 NetworkChangeNotifierAndroid::GetCurrentNetworkConnectionType( |
| 189 NetworkHandle network) const { | 189 NetworkHandle network) const { |
| 190 return delegate_->GetNetworkConnectionType(network); | 190 return delegate_->GetNetworkConnectionType(network); |
| 191 } | 191 } |
| 192 | 192 |
| 193 NetworkChangeNotifier::NetworkHandle | 193 NetworkChangeNotifier::NetworkHandle |
| 194 NetworkChangeNotifierAndroid::GetCurrentDefaultNetwork() const { | 194 NetworkChangeNotifierAndroid::GetCurrentDefaultNetwork() const { |
| 195 return delegate_->GetCurrentDefaultNetwork(); | 195 return delegate_->GetCurrentDefaultNetwork(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 bool NetworkChangeNotifierAndroid::GetCurrentNetworkCaptivePortal() const { |
| 199 return delegate_->GetCurrentNetworkCaptivePortal(); |
| 200 } |
| 201 |
| 198 void NetworkChangeNotifierAndroid::OnConnectionTypeChanged() { | 202 void NetworkChangeNotifierAndroid::OnConnectionTypeChanged() { |
| 199 DnsConfigServiceThread::NotifyNetworkChangeNotifierObservers(); | 203 DnsConfigServiceThread::NotifyNetworkChangeNotifierObservers(); |
| 200 } | 204 } |
| 201 | 205 |
| 202 void NetworkChangeNotifierAndroid::OnMaxBandwidthChanged( | 206 void NetworkChangeNotifierAndroid::OnMaxBandwidthChanged( |
| 203 double max_bandwidth_mbps, | 207 double max_bandwidth_mbps, |
| 204 ConnectionType type) { | 208 ConnectionType type) { |
| 205 NetworkChangeNotifier::NotifyObserversOfMaxBandwidthChange(max_bandwidth_mbps, | 209 NetworkChangeNotifier::NotifyObserversOfMaxBandwidthChange(max_bandwidth_mbps, |
| 206 type); | 210 type); |
| 207 } | 211 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 NetworkChangeNotifier::GetConnectionType(); | 279 NetworkChangeNotifier::GetConnectionType(); |
| 276 NetworkChangeNotifier::LogOperatorCodeHistogram(type); | 280 NetworkChangeNotifier::LogOperatorCodeHistogram(type); |
| 277 if (NetworkChangeNotifier::IsConnectionCellular(type)) { | 281 if (NetworkChangeNotifier::IsConnectionCellular(type)) { |
| 278 UMA_HISTOGRAM_ENUMERATION("NCN.CellularConnectionSubtype", | 282 UMA_HISTOGRAM_ENUMERATION("NCN.CellularConnectionSubtype", |
| 279 delegate_->GetCurrentConnectionSubtype(), | 283 delegate_->GetCurrentConnectionSubtype(), |
| 280 SUBTYPE_LAST + 1); | 284 SUBTYPE_LAST + 1); |
| 281 } | 285 } |
| 282 } | 286 } |
| 283 | 287 |
| 284 } // namespace net | 288 } // namespace net |
| OLD | NEW |