Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 398 // Larger size may affect performance. | 398 // Larger size may affect performance. |
| 399 static const size_t kMaximumNetworkQualityCacheSize = 10; | 399 static const size_t kMaximumNetworkQualityCacheSize = 10; |
| 400 | 400 |
| 401 // Returns the RTT value to be used when the valid RTT is unavailable. Readers | 401 // Returns the RTT value to be used when the valid RTT is unavailable. Readers |
| 402 // should discard RTT if it is set to the value returned by |InvalidRTT()|. | 402 // should discard RTT if it is set to the value returned by |InvalidRTT()|. |
| 403 static const base::TimeDelta InvalidRTT(); | 403 static const base::TimeDelta InvalidRTT(); |
| 404 | 404 |
| 405 // Records UMA when there is a change in connection type. | 405 // Records UMA when there is a change in connection type. |
| 406 void RecordMetricsOnConnectionTypeChanged() const; | 406 void RecordMetricsOnConnectionTypeChanged() const; |
| 407 | 407 |
| 408 // Records UMA on whether the network ID was available or not. Called right | |
|
bengr
2016/07/08 17:00:07
Please describe what a network ID is.
tbansal1
2016/07/08 18:39:08
Changed it to NetworkID which is a defined struct.
| |
| 409 // after a network change event. | |
| 410 void RecordNetworkIDAvailability() const; | |
| 411 | |
| 408 // Records UMA on main frame requests. | 412 // Records UMA on main frame requests. |
| 409 void RecordMetricsOnMainFrameRequest() const; | 413 void RecordMetricsOnMainFrameRequest() const; |
| 410 | 414 |
| 411 // Records a downstream throughput observation to the observation buffer if | 415 // Records a downstream throughput observation to the observation buffer if |
| 412 // a valid observation is available. |downstream_kbps| is the downstream | 416 // a valid observation is available. |downstream_kbps| is the downstream |
| 413 // throughput in kilobits per second. | 417 // throughput in kilobits per second. |
| 414 void OnNewThroughputObservationAvailable(int32_t downstream_kbps); | 418 void OnNewThroughputObservationAvailable(int32_t downstream_kbps); |
| 415 | 419 |
| 416 // Notifies |this| of a new transport layer RTT. | 420 // Notifies |this| of a new transport layer RTT. |
| 417 void OnUpdatedRTTAvailable(SocketPerformanceWatcherFactory::Protocol protocol, | 421 void OnUpdatedRTTAvailable(SocketPerformanceWatcherFactory::Protocol protocol, |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 609 base::ThreadChecker thread_checker_; | 613 base::ThreadChecker thread_checker_; |
| 610 | 614 |
| 611 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 615 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
| 612 | 616 |
| 613 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 617 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
| 614 }; | 618 }; |
| 615 | 619 |
| 616 } // namespace net | 620 } // namespace net |
| 617 | 621 |
| 618 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 622 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| OLD | NEW |