summaryrefslogtreecommitdiff
path: root/netwerk
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk')
-rw-r--r--netwerk/cache2/CacheFileIOManager.cpp48
-rw-r--r--netwerk/cache2/CacheObserver.cpp29
-rw-r--r--netwerk/cache2/CacheObserver.h5
3 files changed, 0 insertions, 82 deletions
diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp
index f6b499e47e..25e621d12b 100644
--- a/netwerk/cache2/CacheFileIOManager.cpp
+++ b/netwerk/cache2/CacheFileIOManager.cpp
@@ -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."));
diff --git a/netwerk/cache2/CacheObserver.cpp b/netwerk/cache2/CacheObserver.cpp
index 51afaf3a14..32e0dff954 100644
--- a/netwerk/cache2/CacheObserver.cpp
+++ b/netwerk/cache2/CacheObserver.cpp
@@ -86,9 +86,6 @@ bool CacheObserver::sSanitizeOnShutdown = kDefaultSanitizeOnShutdown;
static bool kDefaultClearCacheOnShutdown = false;
bool CacheObserver::sClearCacheOnShutdown = kDefaultClearCacheOnShutdown;
-static bool kDefaultCacheFSReported = false;
-bool CacheObserver::sCacheFSReported = kDefaultCacheFSReported;
-
static uint32_t const kDefaultMaxShutdownIOLag = 2; // seconds
Atomic<uint32_t, Relaxed> CacheObserver::sMaxShutdownIOLag(kDefaultMaxShutdownIOLag);
@@ -328,32 +325,6 @@ CacheObserver::StoreDiskCacheCapacity()
}
// static
-void
-CacheObserver::SetCacheFSReported()
-{
- sCacheFSReported = true;
-
- if (!sSelf) {
- return;
- }
-
- if (NS_IsMainThread()) {
- sSelf->StoreCacheFSReported();
- } else {
- nsCOMPtr<nsIRunnable> event =
- NewRunnableMethod(sSelf, &CacheObserver::StoreCacheFSReported);
- NS_DispatchToMainThread(event);
- }
-}
-
-void
-CacheObserver::StoreCacheFSReported()
-{
- mozilla::Preferences::SetInt("browser.cache.disk.filesystem_reported",
- sCacheFSReported);
-}
-
-// static
void CacheObserver::ParentDirOverride(nsIFile** aDir)
{
if (NS_WARN_IF(!aDir))
diff --git a/netwerk/cache2/CacheObserver.h b/netwerk/cache2/CacheObserver.h
index ee989e4d87..ccdd890309 100644
--- a/netwerk/cache2/CacheObserver.h
+++ b/netwerk/cache2/CacheObserver.h
@@ -61,9 +61,6 @@ class CacheObserver : public nsIObserver
{ return sHalfLifeExperiment; }
static bool ClearCacheOnShutdown()
{ return sSanitizeOnShutdown && sClearCacheOnShutdown; }
- static bool CacheFSReported()
- { return sCacheFSReported; }
- static void SetCacheFSReported();
static void ParentDirOverride(nsIFile ** aDir);
static bool EntryIsTooBig(int64_t aSize, bool aUsingDisk);
@@ -79,7 +76,6 @@ private:
static CacheObserver* sSelf;
void StoreDiskCacheCapacity();
- void StoreCacheFSReported();
void AttachToPreferences();
static uint32_t sUseNewCache;
@@ -102,7 +98,6 @@ private:
static int32_t sHalfLifeExperiment;
static bool sSanitizeOnShutdown;
static bool sClearCacheOnShutdown;
- static bool sCacheFSReported;
static Atomic<uint32_t, Relaxed> sMaxShutdownIOLag;
static Atomic<PRIntervalTime> sShutdownDemandedTime;