summaryrefslogtreecommitdiff
path: root/startupcache
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-03 10:11:38 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-03 10:11:38 +0200
commitab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (patch)
treec44670a25d942a672951e430499f70978ec7d337 /startupcache
parent45f9a0daad81d1c6a1188b3473e5f0c67d27c0aa (diff)
downloaduxp-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.gz
Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables). Stub resolution/removal should be a follow-up to this.
Diffstat (limited to 'startupcache')
-rw-r--r--startupcache/StartupCache.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp
index 371f4795c0..d4102efa16 100644
--- a/startupcache/StartupCache.cpp
+++ b/startupcache/StartupCache.cpp
@@ -242,31 +242,6 @@ StartupCache::LoadArchive(enum TelemetrifyAge flag)
mArchive = new nsZipArchive();
rv = mArchive->OpenArchive(mFile);
- if (NS_FAILED(rv) || flag == IGNORE_AGE)
- return rv;
-
- nsCString comment;
- if (!mArchive->GetComment(comment)) {
- return rv;
- }
-
- const char *data;
- size_t len = NS_CStringGetData(comment, &data);
- PRTime creationStamp;
- // We might not have a comment if the startup cache file was created
- // before we started recording creation times in the comment.
- if (len == sizeof(creationStamp)) {
- memcpy(&creationStamp, data, len);
- PRTime current = PR_Now();
- int64_t diff = current - creationStamp;
-
- // We can't use AccumulateTimeDelta here because we have no way of
- // reifying a TimeStamp from creationStamp.
- int64_t usec_per_hour = PR_USEC_PER_SEC * int64_t(3600);
- int64_t hour_diff = (diff + usec_per_hour - 1) / usec_per_hour;
- mozilla::Telemetry::Accumulate(Telemetry::STARTUP_CACHE_AGE_HOURS,
- hour_diff);
- }
return rv;
}
@@ -497,7 +472,6 @@ StartupCache::InvalidateCache()
if (NS_FAILED(rv) && rv != NS_ERROR_FILE_TARGET_DOES_NOT_EXIST &&
rv != NS_ERROR_FILE_NOT_FOUND) {
gIgnoreDiskCache = true;
- mozilla::Telemetry::Accumulate(Telemetry::STARTUP_CACHE_INVALID, true);
return;
}
gIgnoreDiskCache = false;