diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-04 07:41:14 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-04 07:41:14 +0200 |
commit | 45ec2bceb4822646805136b8874a3681b14e78ef (patch) | |
tree | d1db6daa9b40f85e6bc36a6768d1b74d735454f8 /startupcache | |
parent | 7d73b3fbfe1cd4f3a45b569f98f19041f95a50b9 (diff) | |
parent | 2e00eb87ef299e6eb7521670e6a6720fee19f5fc (diff) | |
download | UXP-45ec2bceb4822646805136b8874a3681b14e78ef.tar UXP-45ec2bceb4822646805136b8874a3681b14e78ef.tar.gz UXP-45ec2bceb4822646805136b8874a3681b14e78ef.tar.lz UXP-45ec2bceb4822646805136b8874a3681b14e78ef.tar.xz UXP-45ec2bceb4822646805136b8874a3681b14e78ef.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'startupcache')
-rw-r--r-- | startupcache/StartupCache.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
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; |