diff options
author | wicknix <39230578+wicknix@users.noreply.github.com> | 2019-04-15 18:58:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-15 18:58:07 -0500 |
commit | 5a1843c9f9e323627f9c35529e6a8c853d4dbb0d (patch) | |
tree | 62de3cd7cb8a6f75e568863bb73ca2deb80d87a9 /netwerk/cache2/CacheFileIOManager.cpp | |
parent | 065f6f9e5ebc1ed6cfaadaf7851b6021fa94a013 (diff) | |
parent | 095ea556855b38138e39e713f482eb440f7da9b2 (diff) | |
download | UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.tar UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.tar.gz UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.tar.lz UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.tar.xz UXP-5a1843c9f9e323627f9c35529e6a8c853d4dbb0d.zip |
Merge pull request #1 from MoonchildProductions/master
keep up with mc
Diffstat (limited to 'netwerk/cache2/CacheFileIOManager.cpp')
-rw-r--r-- | netwerk/cache2/CacheFileIOManager.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp index 1d0d57635..25e621d12 100644 --- a/netwerk/cache2/CacheFileIOManager.cpp +++ b/netwerk/cache2/CacheFileIOManager.cpp @@ -21,7 +21,6 @@ #include "nsIObserverService.h" #include "nsICacheStorageVisitor.h" #include "nsISizeOf.h" -#include "mozilla/Telemetry.h" #include "mozilla/DebugOnly.h" #include "mozilla/Services.h" #include "nsDirectoryServiceUtils.h" @@ -1173,8 +1172,6 @@ CacheFileIOManager::Shutdown() return NS_ERROR_NOT_INITIALIZED; } - Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE_SHUTDOWN_V2> shutdownTimer; - CacheIndex::PreShutdown(); ShutdownMetadataWriteScheduling(); @@ -1192,7 +1189,6 @@ CacheFileIOManager::Shutdown() CacheIndex::Shutdown(); if (CacheObserver::ClearCacheOnShutdown()) { - Telemetry::AutoTimer<Telemetry::NETWORK_DISK_CACHE2_SHUTDOWN_CLEAR_PRIVATE> totalTimer; gInstance->SyncRemoveAllCacheFiles(); } @@ -3826,45 +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 - - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_FS_TYPE, fsType); - CacheObserver::SetCacheFSReported(); - } - return NS_OK; } @@ -3910,18 +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; - Telemetry::Accumulate(Telemetry::NETWORK_CACHE_SIZE_FULL_FAT, - cacheUsage); - sSizeReported = true; - } - } } else { LOG(("CacheFileIOManager::OpenNSPRHandle() - Couldn't evict an existing" " entry.")); |