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 da8d17bf79d03d16eb2c5e3a2de4c50094e8875f..f46367e14573dccc71cf55871f0e4245b2b3f0a7 100644 |
--- a/net/nqe/network_quality_estimator_params.h |
+++ b/net/nqe/network_quality_estimator_params.h |
@@ -96,14 +96,28 @@ class NET_EXPORT NetworkQualityEstimatorParams { |
// the effective connection type that has been forced. |
base::Optional<EffectiveConnectionType> forced_effective_connection_type() |
const { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
return forced_effective_connection_type_; |
} |
+ void SetForcedEffectiveConnectionType( |
+ EffectiveConnectionType forced_effective_connection_type) { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ forced_effective_connection_type_ = forced_effective_connection_type; |
+ } |
+ |
// Returns true if reading from the persistent cache is enabled. |
bool persistent_cache_reading_enabled() const { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
return persistent_cache_reading_enabled_; |
} |
+ void set_persistent_cache_reading_enabled( |
+ bool persistent_cache_reading_enabled) { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ persistent_cache_reading_enabled_ = persistent_cache_reading_enabled; |
+ } |
+ |
// Returns the the minimum interval betweeen consecutive notifications to a |
// single socket watcher. |
base::TimeDelta min_socket_watcher_notification_interval() const { |
@@ -117,6 +131,14 @@ class NET_EXPORT NetworkQualityEstimatorParams { |
GetEffectiveConnectionTypeAlgorithmFromString( |
const std::string& algorithm_param_value); |
+ void SetEffectiveConnectionTypeAlgorithm( |
+ EffectiveConnectionTypeAlgorithm algorithm) { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ effective_connection_type_algorithm_ = algorithm; |
+ } |
+ |
+ void DetachFromThread() { thread_checker_.DetachFromThread(); } |
mgersh
2017/06/28 18:26:50
While you're here, can this ThreadChecker be chang
tbansal1
2017/06/29 01:17:58
Done.
|
+ |
private: |
// Map containing all field trial parameters related to |
// NetworkQualityEstimator field trial. |
@@ -126,9 +148,8 @@ class NET_EXPORT NetworkQualityEstimatorParams { |
const double weight_multiplier_per_second_; |
const double weight_multiplier_per_dbm_; |
const double correlation_uma_logging_probability_; |
- const base::Optional<EffectiveConnectionType> |
- forced_effective_connection_type_; |
- const bool persistent_cache_reading_enabled_; |
+ base::Optional<EffectiveConnectionType> forced_effective_connection_type_; |
+ bool persistent_cache_reading_enabled_; |
const base::TimeDelta min_socket_watcher_notification_interval_; |
EffectiveConnectionTypeAlgorithm effective_connection_type_algorithm_; |