Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Side by Side Diff: net/base/network_quality_estimator.h

Issue 1897903002: Record how frequently EEP provides valid estimates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed whitespace (asvitkine's comment) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/base/network_quality_estimator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BASE_NETWORK_QUALITY_ESTIMATOR_H_ 5 #ifndef NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_
6 #define NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ 6 #define NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 274 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
275 PercentileSameTimestamps); 275 PercentileSameTimestamps);
276 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 276 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
277 PercentileDifferentTimestamps); 277 PercentileDifferentTimestamps);
278 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles); 278 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles);
279 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestCaching); 279 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestCaching);
280 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 280 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
281 TestLRUCacheMaximumSize); 281 TestLRUCacheMaximumSize);
282 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMedianRTTSince); 282 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMedianRTTSince);
283 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 283 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
284 TestExternalEstimateProvider);
285 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
286 TestExternalEstimateProviderMergeEstimates); 284 TestExternalEstimateProviderMergeEstimates);
287 285
288 class SocketWatcher; 286 class SocketWatcher;
289 class SocketWatcherFactory; 287 class SocketWatcherFactory;
290 288
291 // NetworkQuality is used to cache the quality of a network connection. 289 // NetworkQuality is used to cache the quality of a network connection.
292 class NET_EXPORT_PRIVATE NetworkQuality { 290 class NET_EXPORT_PRIVATE NetworkQuality {
293 public: 291 public:
294 NetworkQuality(); 292 NetworkQuality();
295 // |rtt| is the estimate of the round trip time. 293 // |rtt| is the estimate of the round trip time.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 583
586 // Values of external estimate provider status. This enum must remain 584 // Values of external estimate provider status. This enum must remain
587 // synchronized with the enum of the same name in 585 // synchronized with the enum of the same name in
588 // metrics/histograms/histograms.xml. 586 // metrics/histograms/histograms.xml.
589 enum NQEExternalEstimateProviderStatus { 587 enum NQEExternalEstimateProviderStatus {
590 EXTERNAL_ESTIMATE_PROVIDER_STATUS_NOT_AVAILABLE, 588 EXTERNAL_ESTIMATE_PROVIDER_STATUS_NOT_AVAILABLE,
591 EXTERNAL_ESTIMATE_PROVIDER_STATUS_AVAILABLE, 589 EXTERNAL_ESTIMATE_PROVIDER_STATUS_AVAILABLE,
592 EXTERNAL_ESTIMATE_PROVIDER_STATUS_QUERIED, 590 EXTERNAL_ESTIMATE_PROVIDER_STATUS_QUERIED,
593 EXTERNAL_ESTIMATE_PROVIDER_STATUS_QUERY_SUCCESSFUL, 591 EXTERNAL_ESTIMATE_PROVIDER_STATUS_QUERY_SUCCESSFUL,
594 EXTERNAL_ESTIMATE_PROVIDER_STATUS_CALLBACK, 592 EXTERNAL_ESTIMATE_PROVIDER_STATUS_CALLBACK,
593 EXTERNAL_ESTIMATE_PROVIDER_STATUS_RTT_AVAILABLE,
594 EXTERNAL_ESTIMATE_PROVIDER_STATUS_DOWNLINK_BANDWIDTH_AVAILABLE,
595 EXTERNAL_ESTIMATE_PROVIDER_STATUS_BOUNDARY 595 EXTERNAL_ESTIMATE_PROVIDER_STATUS_BOUNDARY
596 }; 596 };
597 597
598 // Records the metrics related to external estimate provider. 598 // Records the metrics related to external estimate provider.
599 void RecordExternalEstimateProviderMetrics( 599 void RecordExternalEstimateProviderMetrics(
600 NQEExternalEstimateProviderStatus status) const; 600 NQEExternalEstimateProviderStatus status) const;
601 601
602 // Determines if the requests to local host can be used in estimating the 602 // Determines if the requests to local host can be used in estimating the
603 // network quality. Set to true only for tests. 603 // network quality. Set to true only for tests.
604 const bool allow_localhost_requests_; 604 const bool allow_localhost_requests_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 base::ThreadChecker thread_checker_; 663 base::ThreadChecker thread_checker_;
664 664
665 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; 665 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
666 666
667 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 667 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
668 }; 668 };
669 669
670 } // namespace net 670 } // namespace net
671 671
672 #endif // NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ 672 #endif // NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698