Commit 48e85688 authored by Jarryd's avatar Jarryd Committed by Commit Bot

Quota: Clean up QuotaUnlimitedPoolSize feature.

This feature was set up to be used in a finch trial that has since
ended. This change removes the now unused feature.

Bug: 1133378
Change-Id: Ic484aa7f72c94f1f3e5924580b39f8f7b783b891
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2437006Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Jarryd Goodman <jarrydg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812513}
parent 529c85d5
...@@ -8,13 +8,6 @@ namespace storage { ...@@ -8,13 +8,6 @@ namespace storage {
namespace features { namespace features {
// QuotaUnlimitedPoolSize removes limitations around disk space consumption with
// respect to client-side storage web platform APIs. When enabled, quota will
// set no limit on how much space a single origin can consume, as well as
// removing limits on how much disk space the temporary pool can consume.
const base::Feature kQuotaUnlimitedPoolSize{"QuotaUnlimitedPoolSize",
base::FEATURE_DISABLED_BY_DEFAULT};
// IncognitoDynamicQuota enables dynamic assignment of quota to incognito mode // IncognitoDynamicQuota enables dynamic assignment of quota to incognito mode
// based on the physical memory size and removes the fixed upper cap for it. // based on the physical memory size and removes the fixed upper cap for it.
const base::Feature kIncognitoDynamicQuota{"IncognitoDynamicQuota", const base::Feature kIncognitoDynamicQuota{"IncognitoDynamicQuota",
......
...@@ -13,9 +13,6 @@ namespace storage { ...@@ -13,9 +13,6 @@ namespace storage {
namespace features { namespace features {
COMPONENT_EXPORT(STORAGE_BROWSER)
extern const base::Feature kQuotaUnlimitedPoolSize;
COMPONENT_EXPORT(STORAGE_BROWSER) COMPONENT_EXPORT(STORAGE_BROWSER)
extern const base::Feature kIncognitoDynamicQuota; extern const base::Feature kIncognitoDynamicQuota;
extern const base::FeatureParam<double> kIncognitoQuotaRatioLowerBound; extern const base::FeatureParam<double> kIncognitoQuotaRatioLowerBound;
......
...@@ -76,10 +76,7 @@ base::Optional<QuotaSettings> CalculateNominalDynamicSettings( ...@@ -76,10 +76,7 @@ base::Optional<QuotaSettings> CalculateNominalDynamicSettings(
// The fraction of the device's storage the browser is willing to use for // The fraction of the device's storage the browser is willing to use for
// temporary storage. // temporary storage.
const double kTemporaryPoolSizeRatio = const double kTemporaryPoolSizeRatio = kDefaultPoolSizeRatio;
base::FeatureList::IsEnabled(features::kQuotaUnlimitedPoolSize)
? 1.0
: kDefaultPoolSizeRatio;
// The amount of the device's storage the browser attempts to // The amount of the device's storage the browser attempts to
// keep free. If there is less than this amount of storage free // keep free. If there is less than this amount of storage free
...@@ -113,10 +110,7 @@ base::Optional<QuotaSettings> CalculateNominalDynamicSettings( ...@@ -113,10 +110,7 @@ base::Optional<QuotaSettings> CalculateNominalDynamicSettings(
const double kMustRemainAvailableRatio = 0.01; // 1% const double kMustRemainAvailableRatio = 0.01; // 1%
// The fraction of the temporary pool that can be utilized by a single host. // The fraction of the temporary pool that can be utilized by a single host.
const double kPerHostTemporaryRatio = const double kPerHostTemporaryRatio = kDefaultPerHostRatio;
base::FeatureList::IsEnabled(features::kQuotaUnlimitedPoolSize)
? 1.0
: kDefaultPerHostRatio;
// SessionOnly (or ephemeral) origins are allotted a fraction of what // SessionOnly (or ephemeral) origins are allotted a fraction of what
// normal origins are provided, and the amount is capped to a hard limit. // normal origins are provided, and the amount is capped to a hard limit.
......
...@@ -140,25 +140,6 @@ TEST_F(QuotaSettingsTest, Default) { ...@@ -140,25 +140,6 @@ TEST_F(QuotaSettingsTest, Default) {
EXPECT_TRUE(callback_executed); EXPECT_TRUE(callback_executed);
} }
TEST_F(QuotaSettingsTest, UnlimitedTempPool) {
MockQuotaDeviceInfoHelper device_info_helper;
ON_CALL(device_info_helper, AmountOfTotalDiskSpace(_))
.WillByDefault(::testing::Return(2000));
scoped_feature_list_.InitAndEnableFeature(features::kQuotaUnlimitedPoolSize);
bool callback_executed = false;
GetNominalDynamicSettings(
profile_path(), false, &device_info_helper,
base::BindLambdaForTesting([&](base::Optional<QuotaSettings> settings) {
callback_executed = true;
ASSERT_NE(settings, base::nullopt);
EXPECT_EQ(settings->pool_size, 2000);
EXPECT_EQ(settings->per_host_quota, 2000);
}));
task_environment_.RunUntilIdle();
EXPECT_TRUE(callback_executed);
}
TEST_F(QuotaSettingsTest, IncognitoQuotaCapped) { TEST_F(QuotaSettingsTest, IncognitoQuotaCapped) {
MockQuotaDeviceInfoHelper device_info_helper; MockQuotaDeviceInfoHelper device_info_helper;
EXPECT_CALL(device_info_helper, AmountOfPhysicalMemory()).Times(1); EXPECT_CALL(device_info_helper, AmountOfPhysicalMemory()).Times(1);
......
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