diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-05 16:32:43 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-10-04 10:21:07 +0200 |
commit | 180b38ae75680febd04023bf4d53f9a98bc649c0 (patch) | |
tree | fed7bbac3807caa39ae0097f4cf7c18cc5766086 /chromium/storage/browser/quota/quota_settings.cc | |
parent | 812e2db7c43a5773d8cd1a0e20bbfa1576413fc1 (diff) | |
download | qtwebengine-chromium-180b38ae75680febd04023bf4d53f9a98bc649c0.tar.gz |
Fixes for jumbo build
Fixes necessary to make jumbo build work
Change-Id: I1551ddeaa15fdc4e9db72e86ea49191193cb4964
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/storage/browser/quota/quota_settings.cc')
-rw-r--r-- | chromium/storage/browser/quota/quota_settings.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chromium/storage/browser/quota/quota_settings.cc b/chromium/storage/browser/quota/quota_settings.cc index 13958ce112c..925c1fc661b 100644 --- a/chromium/storage/browser/quota/quota_settings.cc +++ b/chromium/storage/browser/quota/quota_settings.cc @@ -24,14 +24,14 @@ namespace storage { namespace { -const int64_t kMBytes = 1024 * 1024; +const int64_t _kMBytes = 1024 * 1024; const int kRandomizedPercentage = 10; const double kDefaultPerHostRatio = 0.75; const double kIncognitoQuotaRatioLowerBound = 0.15; const double kIncognitoQuotaRatioUpperBound = 0.2; // Skews |value| by +/- |percent|. -int64_t RandomizeByPercent(int64_t value, int percent) { +int64_t MyRandomizeByPercent(int64_t value, int percent) { double random_percent = (base::RandDouble() - 0.5) * percent * 2; return value + (value * (random_percent / 100.0)); } @@ -116,7 +116,7 @@ absl::optional<QuotaSettings> CalculateNominalDynamicSettings( // SessionOnly (or ephemeral) origins are allotted a fraction of what // normal origins are provided, and the amount is capped to a hard limit. const double kSessionOnlyHostQuotaRatio = 0.1; // 10% - const int64_t kMaxSessionOnlyHostQuota = 300 * kMBytes; + const int64_t kMaxSessionOnlyHostQuota = 300 * _kMBytes; QuotaSettings settings; @@ -143,7 +143,7 @@ absl::optional<QuotaSettings> CalculateNominalDynamicSettings( static_cast<int64_t>(total * kMustRemainAvailableRatio)); settings.per_host_quota = pool_size * kPerHostTemporaryRatio; settings.session_only_per_host_quota = std::min( - RandomizeByPercent(kMaxSessionOnlyHostQuota, kRandomizedPercentage), + MyRandomizeByPercent(kMaxSessionOnlyHostQuota, kRandomizedPercentage), static_cast<int64_t>(settings.per_host_quota * kSessionOnlyHostQuotaRatio)); settings.refresh_interval = base::TimeDelta::FromSeconds(60); |