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

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

Issue 2674393002: Read NQE prefs to network quality store under all cases (Closed)
Patch Set: Created 3 years, 10 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
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_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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 ObtainAlgorithmToUseFromParams); 383 ObtainAlgorithmToUseFromParams);
384 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam); 384 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam);
385 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles); 385 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles);
386 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince); 386 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince);
387 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 387 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
388 TestExternalEstimateProviderMergeEstimates); 388 TestExternalEstimateProviderMergeEstimates);
389 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 389 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
390 UnknownEffectiveConnectionType); 390 UnknownEffectiveConnectionType);
391 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 391 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
392 TypicalNetworkQualities); 392 TypicalNetworkQualities);
393 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
394 OnPrefsReadWithReadingDisabled);
393 395
394 // Value of round trip time observations is in base::TimeDelta. 396 // Value of round trip time observations is in base::TimeDelta.
395 typedef nqe::internal::Observation<base::TimeDelta> RttObservation; 397 typedef nqe::internal::Observation<base::TimeDelta> RttObservation;
396 typedef nqe::internal::ObservationBuffer<base::TimeDelta> 398 typedef nqe::internal::ObservationBuffer<base::TimeDelta>
397 RttObservationBuffer; 399 RttObservationBuffer;
398 400
399 // Value of throughput observations is in kilobits per second. 401 // Value of throughput observations is in kilobits per second.
400 typedef nqe::internal::Observation<int32_t> ThroughputObservation; 402 typedef nqe::internal::Observation<int32_t> ThroughputObservation;
401 typedef nqe::internal::ObservationBuffer<int32_t> ThroughputObservationBuffer; 403 typedef nqe::internal::ObservationBuffer<int32_t> ThroughputObservationBuffer;
402 404
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 748
747 // Stores the qualities of different networks. 749 // Stores the qualities of different networks.
748 std::unique_ptr<nqe::internal::NetworkQualityStore> network_quality_store_; 750 std::unique_ptr<nqe::internal::NetworkQualityStore> network_quality_store_;
749 751
750 // True if effective connection type value has been forced via variation 752 // True if effective connection type value has been forced via variation
751 // parameters. If set to true, GetEffectiveConnectionType() will always return 753 // parameters. If set to true, GetEffectiveConnectionType() will always return
752 // |forced_effective_connection_type_|. 754 // |forced_effective_connection_type_|.
753 const bool forced_effective_connection_type_set_; 755 const bool forced_effective_connection_type_set_;
754 const EffectiveConnectionType forced_effective_connection_type_; 756 const EffectiveConnectionType forced_effective_connection_type_;
755 757
758 // Set to true if reading of the network quality prefs is enabled.
759 const bool persistent_cache_reading_enabled_;
760
756 base::ThreadChecker thread_checker_; 761 base::ThreadChecker thread_checker_;
757 762
758 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; 763 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
759 764
760 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 765 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
761 }; 766 };
762 767
763 } // namespace net 768 } // namespace net
764 769
765 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 770 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698