forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quota: Add experimental logic for quota pool size expansion.
Bug: 919693 Change-Id: I99bebbbccf7d57a711e4305faa5a57c01a1e39f5 Reviewed-on: https://chromium-review.googlesource.com/c/1401568 Reviewed-by: Victor Costan <pwnall@chromium.org> Reviewed-by: Steven Holte <holte@chromium.org> Commit-Queue: Jarryd Goodman <jarrydg@chromium.org> Cr-Commit-Position: refs/heads/master@{#625543}
- Loading branch information
Jarryd
authored and
Commit Bot
committed
Jan 24, 2019
1 parent
b03357d
commit 7a79f06
Showing
5 changed files
with
171 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "storage/browser/quota/quota_features.h" | ||
|
||
namespace storage { | ||
|
||
namespace features { | ||
|
||
#if defined(OS_CHROMEOS) | ||
// Chrome OS is given a larger fraction, as web content is the considered | ||
// the primary use of the platform. Chrome OS itself maintains free space by | ||
// starting to evict data (old profiles) when less than 1GB remains, | ||
// stopping eviction once 2GB is free. | ||
// Prior to M66 this was 1/3, same as other platforms. | ||
const constexpr double kTemporaryPoolSizeRatioThirds = 2.0 / 3.0; // 66% | ||
#else | ||
const constexpr double kTemporaryPoolSizeRatioThirds = 1.0 / 3.0; // 33% | ||
#endif | ||
|
||
const base::Feature kQuotaExpandPoolSize{"QuotaExpandPoolSize", | ||
base::FEATURE_DISABLED_BY_DEFAULT}; | ||
|
||
constexpr base::FeatureParam<double> kExperimentalPoolSizeRatio{ | ||
&kQuotaExpandPoolSize, "PoolSizeRatio", kTemporaryPoolSizeRatioThirds}; | ||
|
||
constexpr base::FeatureParam<double> kPerHostRatio{&kQuotaExpandPoolSize, | ||
"PerHostRatio", 0.2}; | ||
} // namespace features | ||
} // namespace storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2018 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef STORAGE_BROWSER_QUOTA_QUOTA_FEATURES_H_ | ||
#define STORAGE_BROWSER_QUOTA_QUOTA_FEATURES_H_ | ||
|
||
#include "base/component_export.h" | ||
#include "base/feature_list.h" | ||
#include "base/metrics/field_trial_params.h" | ||
|
||
namespace storage { | ||
|
||
namespace features { | ||
|
||
COMPONENT_EXPORT(STORAGE_BROWSER) | ||
extern const base::Feature kQuotaExpandPoolSize; | ||
extern const base::FeatureParam<double> kExperimentalPoolSizeRatio; | ||
extern const base::FeatureParam<double> kPerHostRatio; | ||
|
||
} // namespace features | ||
|
||
} // namespace storage | ||
|
||
#endif // STORAGE_QUOTA_QUOTA_FEATURES_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters