summaryrefslogtreecommitdiffstats
path: root/netwerk/cache/nsCacheService.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-22 20:10:23 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:52:18 +0200
commit92edec6f587ae6b86c9b27947113997972ce0c1a (patch)
tree246706f86a7e5e3e086cf9ac83f7bdcec0055cee /netwerk/cache/nsCacheService.cpp
parent2dea4edfd7cf9a760149da220e60dddb2b0b0d09 (diff)
downloadUXP-92edec6f587ae6b86c9b27947113997972ce0c1a.tar
UXP-92edec6f587ae6b86c9b27947113997972ce0c1a.tar.gz
UXP-92edec6f587ae6b86c9b27947113997972ce0c1a.tar.lz
UXP-92edec6f587ae6b86c9b27947113997972ce0c1a.tar.xz
UXP-92edec6f587ae6b86c9b27947113997972ce0c1a.zip
Issue #1053 - Remove android support from netwerk
Diffstat (limited to 'netwerk/cache/nsCacheService.cpp')
-rw-r--r--netwerk/cache/nsCacheService.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp
index 4b08614b8..b2d488ea6 100644
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -107,13 +107,9 @@ static const char * prefList[] = {
// Cache sizes, in KB
const int32_t DEFAULT_CACHE_SIZE = 250 * 1024; // 250 MB
-#ifdef ANDROID
-const int32_t MAX_CACHE_SIZE = 200 * 1024; // 200 MB
-const int32_t OLD_MAX_CACHE_SIZE = 200 * 1024; // 200 MB
-#else
const int32_t MAX_CACHE_SIZE = 350 * 1024; // 350 MB
const int32_t OLD_MAX_CACHE_SIZE = 1024 * 1024; // 1 GB
-#endif
+
// Default cache size was 50 MB for many years until FF 4:
const int32_t PRE_GECKO_2_0_DEFAULT_CACHE_SIZE = 50 * 1024;
@@ -593,17 +589,8 @@ SmartCacheSize(const uint32_t availKB, bool shouldUseOldMaxSmartSize)
avail10MBs = 50;
}
-#ifdef ANDROID
- // On Android, smaller/older devices may have very little storage and
- // device owners may be sensitive to storage footprint: Use a smaller
- // percentage of available space and a smaller minimum.
-
- // 20% of space up to 500 MB (10 MB min)
- sz10MBs += std::max<uint32_t>(1, static_cast<uint32_t>(avail10MBs * .2));
-#else
// 40% of space up to 500 MB (50 MB min)
sz10MBs += std::max<uint32_t>(5, static_cast<uint32_t>(avail10MBs * .4));
-#endif
return std::min<uint32_t>(maxSize, sz10MBs * 10 * 1024);
}