Commit 0868dc05 authored by Doug Arnett's avatar Doug Arnett Committed by Commit Bot

[Previews] Removes unused EffectiveConnectionTypeThresholdForClientLoFi

The EffectiveConnectionTypeThresholdForClientLoFi() is no longer used
except for tests (replaced by GetECTThresholdForPreview(PreviewsType::LOFI)),

Change-Id: I925c21ecd5589d6a74f232359dd24f2e84b16ed3
Reviewed-on: https://chromium-review.googlesource.com/c/1359460Reviewed-by: default avatarRyan Sturm <ryansturm@chromium.org>
Commit-Queue: Doug Arnett <dougarnett@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613329}
parent ed18408a
......@@ -620,7 +620,7 @@ TEST_F(PreviewsDeciderImplTest, ClientLoFiDisallowedWhenFeatureDisabled) {
InitializeUIService();
EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_2G,
params::EffectiveConnectionTypeThresholdForClientLoFi());
params::GetECTThresholdForPreview(PreviewsType::LOFI));
ReportEffectiveConnectionType(net::EFFECTIVE_CONNECTION_TYPE_2G);
PreviewsUserData user_data(kDefaultPageId);
......@@ -656,7 +656,7 @@ TEST_F(PreviewsDeciderImplTest, ClientLoFiDisallowedWhenNetworkFast) {
InitializeUIService();
EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_2G,
params::EffectiveConnectionTypeThresholdForClientLoFi());
params::GetECTThresholdForPreview(PreviewsType::LOFI));
ReportEffectiveConnectionType(net::EFFECTIVE_CONNECTION_TYPE_3G);
base::HistogramTester histogram_tester;
......@@ -682,7 +682,7 @@ TEST_F(PreviewsDeciderImplTest, ClientLoFiAllowed) {
// Verify ECT check cases below.
EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_2G,
params::EffectiveConnectionTypeThresholdForClientLoFi());
params::GetECTThresholdForPreview(PreviewsType::LOFI));
const struct {
net::EffectiveConnectionType effective_connection_type;
......@@ -724,7 +724,7 @@ TEST_F(PreviewsDeciderImplTest, MissingHostDisallowed) {
InitializeUIService();
EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_2G,
params::EffectiveConnectionTypeThresholdForClientLoFi());
params::GetECTThresholdForPreview(PreviewsType::LOFI));
ReportEffectiveConnectionType(net::EFFECTIVE_CONNECTION_TYPE_2G);
PreviewsUserData user_data(kDefaultPageId);
......@@ -739,7 +739,7 @@ TEST_F(PreviewsDeciderImplTest, ClientLoFiAllowedOnReload) {
InitializeUIService();
EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_2G,
params::EffectiveConnectionTypeThresholdForClientLoFi());
params::GetECTThresholdForPreview(PreviewsType::LOFI));
ReportEffectiveConnectionType(net::EFFECTIVE_CONNECTION_TYPE_2G);
PreviewsUserData user_data(kDefaultPageId);
......
......@@ -303,12 +303,6 @@ bool IsOptimizationHintsEnabled() {
return base::FeatureList::IsEnabled(features::kOptimizationHints);
}
net::EffectiveConnectionType EffectiveConnectionTypeThresholdForClientLoFi() {
return GetParamValueAsECTByFeature(features::kClientLoFi,
kEffectiveConnectionTypeThreshold,
net::EFFECTIVE_CONNECTION_TYPE_2G);
}
int NoScriptPreviewsInflationPercent() {
// The default value was determined from lab experiment data of whitelisted
// URLs. It may be improved once there is enough UKM live experiment data
......
......@@ -153,10 +153,6 @@ size_t GetMaxPageHintsInMemoryThreshhold();
// Whether server optimization hints are enabled.
bool IsOptimizationHintsEnabled();
// The threshold of EffectiveConnectionType above which Client Lo-Fi previews
// should not be served.
net::EffectiveConnectionType EffectiveConnectionTypeThresholdForClientLoFi();
// For estimating NoScript data savings, this is the percentage factor to
// multiple by the network bytes for inflating the original_bytes count.
int NoScriptPreviewsInflationPercent();
......
......@@ -134,7 +134,7 @@ TEST(PreviewsExperimentsTest, TestEnableClientLoFiWithDefaultParams) {
EXPECT_TRUE(params::IsClientLoFiEnabled());
EXPECT_EQ(0, params::ClientLoFiVersion());
EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_2G,
params::EffectiveConnectionTypeThresholdForClientLoFi());
params::GetECTThresholdForPreview(PreviewsType::LOFI));
}
TEST(PreviewsExperimentsTest, TestEnableClientLoFiWithCustomParams) {
......@@ -146,7 +146,7 @@ TEST(PreviewsExperimentsTest, TestEnableClientLoFiWithCustomParams) {
EXPECT_TRUE(params::IsClientLoFiEnabled());
EXPECT_EQ(10, params::ClientLoFiVersion());
EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_3G,
params::EffectiveConnectionTypeThresholdForClientLoFi());
params::GetECTThresholdForPreview(PreviewsType::LOFI));
}
} // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment