From ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 3 Sep 2018 10:11:38 +0200 Subject: 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. --- startupcache/StartupCache.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'startupcache/StartupCache.cpp') diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp index 371f4795c..d4102efa1 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; -- cgit v1.2.3