[net][disk_cache] Make Wasm code cache size limit 50% larger.
- Adds cache type parameter to disk_cache::PreferredSize.
- Changes implementation to make default cap size 50% larger in
if cache type is net::GENERATED_NATIVE_CODE_CACHE.
Bug: chromium:917510, chromium:1019999
Change-Id: Ieb5dd21aa76e387774659131a3d3aa3e6eed2889
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1937852
Commit-Queue: Bill Budge <[email protected]>
Reviewed-by: Maksim Orlovich <[email protected]>
Cr-Commit-Position: refs/heads/master@{#720678}
diff --git a/net/disk_cache/cache_util.h b/net/disk_cache/cache_util.h
index 0a831ee..ff0f695 100644
--- a/net/disk_cache/cache_util.h
+++ b/net/disk_cache/cache_util.h
@@ -40,8 +40,11 @@
// task. Used by cache creator itself or by backends for self-restart on error.
bool DelayedCacheCleanup(const base::FilePath& full_path);
-// Returns the preferred max cache size given the available disk space.
-NET_EXPORT_PRIVATE int PreferredCacheSize(int64_t available);
+// Returns the preferred max cache size given the available disk space and
+// cache type.
+NET_EXPORT_PRIVATE int PreferredCacheSize(
+ int64_t available,
+ net::CacheType type = net::DISK_CACHE);
// The default cache size should not ideally be exposed, but the blockfile
// backend uses it for reasons that include testing.