| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 NetworkChangeNotifierAndroid::~NetworkChangeNotifierAndroid() { | 108 NetworkChangeNotifierAndroid::~NetworkChangeNotifierAndroid() { |
| 109 delegate_->RemoveObserver(this); | 109 delegate_->RemoveObserver(this); |
| 110 } | 110 } |
| 111 | 111 |
| 112 NetworkChangeNotifier::ConnectionType | 112 NetworkChangeNotifier::ConnectionType |
| 113 NetworkChangeNotifierAndroid::GetCurrentConnectionType() const { | 113 NetworkChangeNotifierAndroid::GetCurrentConnectionType() const { |
| 114 return delegate_->GetCurrentConnectionType(); | 114 return delegate_->GetCurrentConnectionType(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 std::string NetworkChangeNotifierAndroid::GetCurrentWiFiSSID() const { |
| 118 // Not implemented. See https://crbug.com/451272 |
| 119 return ""; |
| 120 } |
| 121 |
| 117 double NetworkChangeNotifierAndroid::GetCurrentMaxBandwidth() const { | 122 double NetworkChangeNotifierAndroid::GetCurrentMaxBandwidth() const { |
| 118 return delegate_->GetCurrentMaxBandwidth(); | 123 return delegate_->GetCurrentMaxBandwidth(); |
| 119 } | 124 } |
| 120 | 125 |
| 121 void NetworkChangeNotifierAndroid::OnConnectionTypeChanged() { | 126 void NetworkChangeNotifierAndroid::OnConnectionTypeChanged() { |
| 122 DnsConfigServiceThread::NotifyNetworkChangeNotifierObservers(); | 127 DnsConfigServiceThread::NotifyNetworkChangeNotifierObservers(); |
| 123 } | 128 } |
| 124 | 129 |
| 125 void NetworkChangeNotifierAndroid::OnMaxBandwidthChanged( | 130 void NetworkChangeNotifierAndroid::OnMaxBandwidthChanged( |
| 126 double max_bandwidth_mbps) { | 131 double max_bandwidth_mbps) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 151 // so delay IPAddressChanged so they get merged with the following | 156 // so delay IPAddressChanged so they get merged with the following |
| 152 // ConnectionTypeChanged signal. | 157 // ConnectionTypeChanged signal. |
| 153 params.ip_address_offline_delay_ = base::TimeDelta::FromSeconds(1); | 158 params.ip_address_offline_delay_ = base::TimeDelta::FromSeconds(1); |
| 154 params.ip_address_online_delay_ = base::TimeDelta::FromSeconds(1); | 159 params.ip_address_online_delay_ = base::TimeDelta::FromSeconds(1); |
| 155 params.connection_type_offline_delay_ = base::TimeDelta::FromSeconds(0); | 160 params.connection_type_offline_delay_ = base::TimeDelta::FromSeconds(0); |
| 156 params.connection_type_online_delay_ = base::TimeDelta::FromSeconds(0); | 161 params.connection_type_online_delay_ = base::TimeDelta::FromSeconds(0); |
| 157 return params; | 162 return params; |
| 158 } | 163 } |
| 159 | 164 |
| 160 } // namespace net | 165 } // namespace net |
| OLD | NEW |