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

Unified Diff: net/nqe/network_quality_estimator_params.h

Issue 2875073004: Move more variables to NQE params class (Closed)
Patch Set: ryansturm comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_params.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/network_quality_estimator_params.h
diff --git a/net/nqe/network_quality_estimator_params.h b/net/nqe/network_quality_estimator_params.h
index 2a50fe661cfdc773469f233d09e19f57c2d8c948..5c279e1b39d5b615c9fe5db630f3536c9353ecc8 100644
--- a/net/nqe/network_quality_estimator_params.h
+++ b/net/nqe/network_quality_estimator_params.h
@@ -44,25 +44,21 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimatorParams {
// Returns a descriptive name corresponding to |connection_type|.
static const char* GetNameForConnectionType(
- net::NetworkChangeNotifier::ConnectionType connection_type);
-
- // Sets the default observation for different connection types in
- // |default_observations|. The default observations are different for
- // different connection types (e.g., 2G, 3G, 4G, WiFi). The default
- // observations may be used to determine the network quality in absence of any
- // other information.
- void ObtainDefaultObservations(
- nqe::internal::NetworkQuality default_observations[]) const;
-
- // Sets |typical_network_quality| to typical network quality for different
- // effective connection types.
- void ObtainTypicalNetworkQuality(
- NetworkQuality typical_network_quality[]) const;
-
- // Sets the thresholds for different effective connection types in
- // |connection_thresholds|.
- void ObtainEffectiveConnectionTypeModelParams(
- nqe::internal::NetworkQuality connection_thresholds[]) const;
+ NetworkChangeNotifier::ConnectionType connection_type);
+
+ // Returns the default observation for connection |type|. The default
+ // observations are different for different connection types (e.g., 2G, 3G,
+ // 4G, WiFi). The default observations may be used to determine the network
+ // quality in absence of any other information.
+ const NetworkQuality& DefaultObservation(
+ NetworkChangeNotifier::ConnectionType type) const;
+
+ // Returns the typical network quality for connection |type|.
+ const NetworkQuality& TypicalNetworkQuality(
+ EffectiveConnectionType type) const;
+
+ // Returns the threshold for effective connection type |type|.
+ const NetworkQuality& ConnectionThreshold(EffectiveConnectionType type) const;
// Returns the weight multiplier per second, which represents the factor by
// which the weight of an observation reduces every second.
@@ -115,6 +111,21 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimatorParams {
const bool persistent_cache_reading_enabled_;
const base::TimeDelta min_socket_watcher_notification_interval_;
+ // Default network quality observations obtained from |params_|.
+ NetworkQuality
+ default_observations_[NetworkChangeNotifier::CONNECTION_LAST + 1];
+
+ // Typical network quality for different effective connection types obtained
+ // from |params_|.
+ NetworkQuality typical_network_quality_
+ [EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_LAST];
+
+ // Thresholds for different effective connection types obtained from
+ // |params_|. These thresholds encode how different connection types behave
+ // in general.
+ NetworkQuality connection_thresholds_
+ [EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_LAST];
+
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorParams);
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698