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

Unified Diff: net/nqe/network_quality_estimator_params.cc

Issue 2850003002: Add flag to override Effective Connection Type (Closed)
Patch Set: ps Created 3 years, 8 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
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 d88bd4aa492f74c751e41e50c58a6b6ca5fd360a..2f51903175b2aef66f44d80c9cc428505a3a46df 100644
--- a/net/nqe/network_quality_estimator_params.cc
+++ b/net/nqe/network_quality_estimator_params.cc
@@ -66,6 +66,8 @@ std::string GetStringValueForVariationParamWithDefaultValue(
namespace net {
+const char kForceEffectiveConnectionType[] = "force_effective_connection_type";
+
namespace nqe {
namespace internal {
@@ -363,7 +365,7 @@ double NetworkQualityEstimatorParams::correlation_uma_logging_probability()
bool NetworkQualityEstimatorParams::forced_effective_connection_type_set()
const {
return !GetStringValueForVariationParamWithDefaultValue(
- params_, "force_effective_connection_type", "")
+ params_, kForceEffectiveConnectionType, "")
.empty();
}
@@ -372,7 +374,7 @@ NetworkQualityEstimatorParams::forced_effective_connection_type() const {
EffectiveConnectionType forced_effective_connection_type =
EFFECTIVE_CONNECTION_TYPE_UNKNOWN;
std::string forced_value = GetStringValueForVariationParamWithDefaultValue(
- params_, "force_effective_connection_type",
+ params_, kForceEffectiveConnectionType,
GetNameForEffectiveConnectionType(EFFECTIVE_CONNECTION_TYPE_UNKNOWN));
DCHECK(!forced_value.empty());
bool effective_connection_type_available = GetEffectiveConnectionTypeForName(

Powered by Google App Engine
This is Rietveld 408576698