Remove telemetry probes for cache file system.

This commit is contained in:
wolfbeast 2018-09-29 23:55:49 +02:00 committed by Roy Tam
commit e87890d893
5 changed files with 0 additions and 99 deletions

View file

@ -3822,44 +3822,6 @@ CacheFileIOManager::CreateCacheTree()
StartRemovingTrash();
if (!CacheObserver::CacheFSReported()) {
uint32_t fsType = 4; // Other OS
#ifdef XP_WIN
nsAutoString target;
nsresult rv = mCacheDirectory->GetTarget(target);
if (NS_FAILED(rv)) {
return NS_OK;
}
wchar_t volume_path[MAX_PATH + 1] = { 0 };
if (!::GetVolumePathNameW(target.get(),
volume_path,
mozilla::ArrayLength(volume_path))) {
return NS_OK;
}
wchar_t fsName[6] = { 0 };
if (!::GetVolumeInformationW(volume_path, nullptr, 0, nullptr, nullptr,
nullptr, fsName,
mozilla::ArrayLength(fsName))) {
return NS_OK;
}
if (wcscmp(fsName, L"NTFS") == 0) {
fsType = 0;
} else if (wcscmp(fsName, L"FAT32") == 0) {
fsType = 1;
} else if (wcscmp(fsName, L"FAT") == 0) {
fsType = 2;
} else {
fsType = 3;
}
#endif
CacheObserver::SetCacheFSReported();
}
return NS_OK;
}
@ -3905,16 +3867,6 @@ CacheFileIOManager::OpenNSPRHandle(CacheFileHandle *aHandle, bool aCreate)
LOG(("CacheFileIOManager::OpenNSPRHandle() - Successfully evicted entry"
" with hash %08x%08x%08x%08x%08x. %s to create the new file.",
LOGSHA1(&hash), NS_SUCCEEDED(rv) ? "Succeeded" : "Failed"));
// Report the full size only once per session
static bool sSizeReported = false;
if (!sSizeReported) {
uint32_t cacheUsage;
if (NS_SUCCEEDED(CacheIndex::GetCacheSize(&cacheUsage))) {
cacheUsage >>= 10;
sSizeReported = true;
}
}
} else {
LOG(("CacheFileIOManager::OpenNSPRHandle() - Couldn't evict an existing"
" entry."));