| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // so delay IPAddressChanged so they get merged with the following | 265 // so delay IPAddressChanged so they get merged with the following |
| 266 // ConnectionTypeChanged signal. | 266 // ConnectionTypeChanged signal. |
| 267 params.ip_address_offline_delay_ = base::TimeDelta::FromSeconds(1); | 267 params.ip_address_offline_delay_ = base::TimeDelta::FromSeconds(1); |
| 268 params.ip_address_online_delay_ = base::TimeDelta::FromSeconds(1); | 268 params.ip_address_online_delay_ = base::TimeDelta::FromSeconds(1); |
| 269 params.connection_type_offline_delay_ = base::TimeDelta::FromSeconds(0); | 269 params.connection_type_offline_delay_ = base::TimeDelta::FromSeconds(0); |
| 270 params.connection_type_online_delay_ = base::TimeDelta::FromSeconds(0); | 270 params.connection_type_online_delay_ = base::TimeDelta::FromSeconds(0); |
| 271 return params; | 271 return params; |
| 272 } | 272 } |
| 273 | 273 |
| 274 void NetworkChangeNotifierAndroid::OnFinalizingMetricsLogRecord() { | 274 void NetworkChangeNotifierAndroid::OnFinalizingMetricsLogRecord() { |
| 275 NetworkChangeNotifier::OnFinalizingMetricsLogRecord(); |
| 275 // Metrics logged here will be included in every metrics log record. It's not | 276 // Metrics logged here will be included in every metrics log record. It's not |
| 276 // yet clear if these metrics are generally useful enough to warrant being | 277 // yet clear if these metrics are generally useful enough to warrant being |
| 277 // added to the SystemProfile proto, so they are logged here as histograms for | 278 // added to the SystemProfile proto, so they are logged here as histograms for |
| 278 // now. | 279 // now. |
| 279 const NetworkChangeNotifier::ConnectionType type = | 280 const NetworkChangeNotifier::ConnectionType type = |
| 280 NetworkChangeNotifier::GetConnectionType(); | 281 NetworkChangeNotifier::GetConnectionType(); |
| 281 NetworkChangeNotifier::LogOperatorCodeHistogram(type); | 282 NetworkChangeNotifier::LogOperatorCodeHistogram(type); |
| 282 if (NetworkChangeNotifier::IsConnectionCellular(type)) { | 283 if (NetworkChangeNotifier::IsConnectionCellular(type)) { |
| 283 UMA_HISTOGRAM_ENUMERATION("NCN.CellularConnectionSubtype", | 284 UMA_HISTOGRAM_ENUMERATION("NCN.CellularConnectionSubtype", |
| 284 delegate_->GetCurrentConnectionSubtype(), | 285 delegate_->GetCurrentConnectionSubtype(), |
| 285 SUBTYPE_LAST + 1); | 286 SUBTYPE_LAST + 1); |
| 286 } | 287 } |
| 287 } | 288 } |
| 288 | 289 |
| 289 } // namespace net | 290 } // namespace net |
| OLD | NEW |