Index: net/nqe/network_quality_estimator_params.cc |
diff --git a/net/nqe/network_quality_estimator_params.cc b/net/nqe/network_quality_estimator_params.cc |
index 4da0ea209bee322248d7cc84acda049523853e8d..56ab6298f96ad81980119cc3bbd28e0dfa121501 100644 |
--- a/net/nqe/network_quality_estimator_params.cc |
+++ b/net/nqe/network_quality_estimator_params.cc |
@@ -79,27 +79,6 @@ double GetWeightMultiplierPerSecond( |
return pow(0.5, 1.0 / half_life_seconds); |
} |
-base::Optional<net::EffectiveConnectionType> GetForcedEffectiveConnectionType( |
- const std::map<std::string, std::string>& params) { |
- std::string forced_value = GetStringValueForVariationParamWithDefaultValue( |
- params, "force_effective_connection_type", ""); |
- if (forced_value.empty()) |
- return base::Optional<net::EffectiveConnectionType>(); |
- |
- net::EffectiveConnectionType forced_effective_connection_type = |
- net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN; |
- |
- bool effective_connection_type_available = GetEffectiveConnectionTypeForName( |
- forced_value, &forced_effective_connection_type); |
- |
- DCHECK(effective_connection_type_available); |
- |
- // Silence unused variable warning in release builds. |
- (void)effective_connection_type_available; |
- |
- return forced_effective_connection_type; |
-} |
- |
bool GetPersistentCacheReadingEnabled( |
const std::map<std::string, std::string>& params) { |
if (GetStringValueForVariationParamWithDefaultValue( |
@@ -120,6 +99,33 @@ base::TimeDelta GetMinSocketWatcherNotificationInterval( |
namespace net { |
+const char kForceEffectiveConnectionType[] = "force_effective_connection_type"; |
+ |
+namespace { |
+ |
+base::Optional<EffectiveConnectionType> GetForcedEffectiveConnectionType( |
+ const std::map<std::string, std::string>& params) { |
+ std::string forced_value = GetStringValueForVariationParamWithDefaultValue( |
+ params, kForceEffectiveConnectionType, ""); |
+ if (forced_value.empty()) |
+ return base::Optional<EffectiveConnectionType>(); |
+ |
+ EffectiveConnectionType forced_effective_connection_type = |
+ EFFECTIVE_CONNECTION_TYPE_UNKNOWN; |
+ |
+ bool effective_connection_type_available = GetEffectiveConnectionTypeForName( |
+ forced_value, &forced_effective_connection_type); |
+ |
+ DCHECK(effective_connection_type_available); |
+ |
+ // Silence unused variable warning in release builds. |
+ (void)effective_connection_type_available; |
+ |
+ return forced_effective_connection_type; |
+} |
+ |
+} // namespace |
+ |
namespace nqe { |
namespace internal { |