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

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

Issue 2672733002: Read NQE prefs to network quality store under all cases (Closed)
Patch Set: ps 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 ObtainAlgorithmToUseFromParams); 391 ObtainAlgorithmToUseFromParams);
392 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam); 392 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam);
393 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles); 393 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles);
394 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince); 394 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince);
395 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 395 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
396 TestExternalEstimateProviderMergeEstimates); 396 TestExternalEstimateProviderMergeEstimates);
397 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 397 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
398 UnknownEffectiveConnectionType); 398 UnknownEffectiveConnectionType);
399 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 399 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
400 TypicalNetworkQualities); 400 TypicalNetworkQualities);
401 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
402 OnPrefsReadWithReadingDisabled);
401 403
402 // Value of round trip time observations is in base::TimeDelta. 404 // Value of round trip time observations is in base::TimeDelta.
403 typedef nqe::internal::Observation<base::TimeDelta> RttObservation; 405 typedef nqe::internal::Observation<base::TimeDelta> RttObservation;
404 typedef nqe::internal::ObservationBuffer<base::TimeDelta> 406 typedef nqe::internal::ObservationBuffer<base::TimeDelta>
405 RttObservationBuffer; 407 RttObservationBuffer;
406 408
407 // Value of throughput observations is in kilobits per second. 409 // Value of throughput observations is in kilobits per second.
408 typedef nqe::internal::Observation<int32_t> ThroughputObservation; 410 typedef nqe::internal::Observation<int32_t> ThroughputObservation;
409 typedef nqe::internal::ObservationBuffer<int32_t> ThroughputObservationBuffer; 411 typedef nqe::internal::ObservationBuffer<int32_t> ThroughputObservationBuffer;
410 412
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 756
755 // Stores the qualities of different networks. 757 // Stores the qualities of different networks.
756 std::unique_ptr<nqe::internal::NetworkQualityStore> network_quality_store_; 758 std::unique_ptr<nqe::internal::NetworkQualityStore> network_quality_store_;
757 759
758 // True if effective connection type value has been forced via variation 760 // True if effective connection type value has been forced via variation
759 // parameters. If set to true, GetEffectiveConnectionType() will always return 761 // parameters. If set to true, GetEffectiveConnectionType() will always return
760 // |forced_effective_connection_type_|. 762 // |forced_effective_connection_type_|.
761 const bool forced_effective_connection_type_set_; 763 const bool forced_effective_connection_type_set_;
762 const EffectiveConnectionType forced_effective_connection_type_; 764 const EffectiveConnectionType forced_effective_connection_type_;
763 765
766 // Set to true if reading of the network quality prefs is enabled.
767 const bool persistent_cache_reading_enabled_;
768
764 base::ThreadChecker thread_checker_; 769 base::ThreadChecker thread_checker_;
765 770
766 // Manages the writing of events to the net log. 771 // Manages the writing of events to the net log.
767 nqe::internal::EventCreator event_creator_; 772 nqe::internal::EventCreator event_creator_;
768 773
769 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; 774 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
770 775
771 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 776 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
772 }; 777 };
773 778
774 } // namespace net 779 } // namespace net
775 780
776 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 781 #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