Remove telemetry to find optimal cache entry hash size

Tag #21.
This commit is contained in:
wolfbeast 2018-09-29 22:56:15 +02:00 committed by Roy Tam
commit f019ffbb0b
5 changed files with 0 additions and 117 deletions

View file

@ -89,9 +89,6 @@ bool CacheObserver::sClearCacheOnShutdown = kDefaultClearCacheOnShutdown;
static bool kDefaultCacheFSReported = false;
bool CacheObserver::sCacheFSReported = kDefaultCacheFSReported;
static bool kDefaultHashStatsReported = false;
bool CacheObserver::sHashStatsReported = kDefaultHashStatsReported;
static uint32_t const kDefaultMaxShutdownIOLag = 2; // seconds
Atomic<uint32_t, Relaxed> CacheObserver::sMaxShutdownIOLag(kDefaultMaxShutdownIOLag);
@ -356,32 +353,6 @@ CacheObserver::StoreCacheFSReported()
sCacheFSReported);
}
// static
void
CacheObserver::SetHashStatsReported()
{
sHashStatsReported = true;
if (!sSelf) {
return;
}
if (NS_IsMainThread()) {
sSelf->StoreHashStatsReported();
} else {
nsCOMPtr<nsIRunnable> event =
NewRunnableMethod(sSelf, &CacheObserver::StoreHashStatsReported);
NS_DispatchToMainThread(event);
}
}
void
CacheObserver::StoreHashStatsReported()
{
mozilla::Preferences::SetInt("browser.cache.disk.hashstats_reported",
sHashStatsReported);
}
// static
void CacheObserver::ParentDirOverride(nsIFile** aDir)
{