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

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

Issue 2883763002: Expose ECT to render frames, Blink and NetInfo (Closed)
Patch Set: rebased Created 3 years, 7 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 // Notifies |observer| of the current RTT and throughput if |observer| is 453 // Notifies |observer| of the current RTT and throughput if |observer| is
454 // still registered as an observer. 454 // still registered as an observer.
455 virtual void NotifyRTTAndThroughputEstimatesObserverIfPresent( 455 virtual void NotifyRTTAndThroughputEstimatesObserverIfPresent(
456 RTTAndThroughputEstimatesObserver* observer) const; 456 RTTAndThroughputEstimatesObserver* observer) const;
457 457
458 // Observer list for RTT or throughput estimates. Protected for testing. 458 // Observer list for RTT or throughput estimates. Protected for testing.
459 base::ObserverList<RTTAndThroughputEstimatesObserver> 459 base::ObserverList<RTTAndThroughputEstimatesObserver>
460 rtt_and_throughput_estimates_observer_list_; 460 rtt_and_throughput_estimates_observer_list_;
461 461
462 // Observer list for changes in effective connection type.
463 base::ObserverList<EffectiveConnectionTypeObserver>
464 effective_connection_type_observer_list_;
465
462 private: 466 private:
463 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 467 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
464 AdaptiveRecomputationEffectiveConnectionType); 468 AdaptiveRecomputationEffectiveConnectionType);
465 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, StoreObservations); 469 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, StoreObservations);
466 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestAddObservation); 470 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestAddObservation);
467 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 471 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
468 DefaultObservationsOverridden); 472 DefaultObservationsOverridden);
469 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, 473 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
470 ObtainAlgorithmToUseFromParams); 474 ObtainAlgorithmToUseFromParams);
471 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles); 475 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 base::TimeDelta http_rtt_at_last_main_frame_[STATISTIC_LAST]; 720 base::TimeDelta http_rtt_at_last_main_frame_[STATISTIC_LAST];
717 721
718 // Estimated network quality obtained from external estimate provider when the 722 // Estimated network quality obtained from external estimate provider when the
719 // external estimate provider was last queried. 723 // external estimate provider was last queried.
720 nqe::internal::NetworkQuality external_estimate_provider_quality_; 724 nqe::internal::NetworkQuality external_estimate_provider_quality_;
721 725
722 // ExternalEstimateProvider that provides network quality using operating 726 // ExternalEstimateProvider that provides network quality using operating
723 // system APIs. May be NULL. 727 // system APIs. May be NULL.
724 const std::unique_ptr<ExternalEstimateProvider> external_estimate_provider_; 728 const std::unique_ptr<ExternalEstimateProvider> external_estimate_provider_;
725 729
726 // Observer list for changes in effective connection type.
727 base::ObserverList<EffectiveConnectionTypeObserver>
728 effective_connection_type_observer_list_;
729
730 // Observer lists for round trip times and throughput measurements. 730 // Observer lists for round trip times and throughput measurements.
731 base::ObserverList<RTTObserver> rtt_observer_list_; 731 base::ObserverList<RTTObserver> rtt_observer_list_;
732 base::ObserverList<ThroughputObserver> throughput_observer_list_; 732 base::ObserverList<ThroughputObserver> throughput_observer_list_;
733 733
734 std::unique_ptr<SocketPerformanceWatcherFactory> watcher_factory_; 734 std::unique_ptr<SocketPerformanceWatcherFactory> watcher_factory_;
735 735
736 // Takes throughput measurements, and passes them back to |this| through the 736 // Takes throughput measurements, and passes them back to |this| through the
737 // provided callback. |this| stores the throughput observations in 737 // provided callback. |this| stores the throughput observations in
738 // |downstream_throughput_kbps_observations_|, which are later used for 738 // |downstream_throughput_kbps_observations_|, which are later used for
739 // estimating the throughput. 739 // estimating the throughput.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 disallowed_observation_sources_for_transport_; 789 disallowed_observation_sources_for_transport_;
790 790
791 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; 791 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
792 792
793 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 793 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
794 }; 794 };
795 795
796 } // namespace net 796 } // namespace net
797 797
798 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 798 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698