diff options
author | adeshkp <adeshkp@users.noreply.github.com> | 2019-01-12 06:20:31 -0500 |
---|---|---|
committer | adeshkp <adeshkp@users.noreply.github.com> | 2019-01-12 06:20:31 -0500 |
commit | 5335681cd2ab05ad47e81be7722c9eee19d54065 (patch) | |
tree | eced0f22032c4f01229ac0a18b9ffb6219cea309 /netwerk/protocol/http/nsHttpChannel.cpp | |
parent | f38edc94a31de3bae839cf63ed57c3851908ac46 (diff) | |
download | UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.tar UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.tar.gz UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.tar.lz UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.tar.xz UXP-5335681cd2ab05ad47e81be7722c9eee19d54065.zip |
Telemetry: Remove stubs and related code
Diffstat (limited to 'netwerk/protocol/http/nsHttpChannel.cpp')
-rw-r--r-- | netwerk/protocol/http/nsHttpChannel.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index be5539a02..a890c51b3 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -83,7 +83,6 @@ #include "nsCRT.h" #include "CacheObserver.h" #include "mozilla/dom/Performance.h" -#include "mozilla/Telemetry.h" #include "AlternateServices.h" #include "InterceptedChannel.h" #include "nsIHttpPushListener.h" @@ -123,19 +122,6 @@ static NS_DEFINE_CID(kStreamListenerTeeCID, NS_STREAMLISTENERTEE_CID); static NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID); -enum CacheDisposition { - kCacheHit = 1, - kCacheHitViaReval = 2, - kCacheMissedViaReval = 3, - kCacheMissed = 4 -}; - -void -AccumulateCacheHitTelemetry(CacheDisposition hitOrMiss) -{ - /* STUB */ -} - // Computes and returns a SHA1 hash of the input buffer. The input buffer // must be a null-terminated string. nsresult @@ -494,11 +480,6 @@ nsHttpChannel::ContinueConnect() event->Revoke(); } - // Don't accumulate the cache hit telemetry for intercepted channels. - if (mInterceptCache != INTERCEPTED) { - AccumulateCacheHitTelemetry(kCacheHit); - } - return rv; } else if (mLoadFlags & LOAD_ONLY_FROM_CACHE) { @@ -1085,10 +1066,8 @@ ProcessXCTO(nsIURI* aURI, nsHttpResponseHead* aResponseHead, nsILoadInfo* aLoadI if (aLoadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_IMAGE) { if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("image/"))) { - Accumulate(Telemetry::XCTO_NOSNIFF_BLOCK_IMAGE, 0); return NS_OK; } - Accumulate(Telemetry::XCTO_NOSNIFF_BLOCK_IMAGE, 1); // Instead of consulting Preferences::GetBool() all the time we // can cache the result to speed things up. static bool sXCTONosniffBlockImages = false; @@ -2116,29 +2095,6 @@ nsHttpChannel::ContinueProcessResponse2(nsresult rv) break; } - if (gHttpHandler->IsTelemetryEnabled()) { - CacheDisposition cacheDisposition; - if (!mDidReval) { - cacheDisposition = kCacheMissed; - } else if (successfulReval) { - cacheDisposition = kCacheHitViaReval; - } else { - cacheDisposition = kCacheMissedViaReval; - } - AccumulateCacheHitTelemetry(cacheDisposition); - - if (mResponseHead->Version() == NS_HTTP_VERSION_0_9) { - // DefaultPortTopLevel = 0, DefaultPortSubResource = 1, - // NonDefaultPortTopLevel = 2, NonDefaultPortSubResource = 3 - uint32_t v09Info = 0; - if (!(mLoadFlags & LOAD_INITIAL_DOCUMENT_URI)) { - v09Info += 1; - } - if (mConnectionInfo->OriginPort() != mConnectionInfo->DefaultPort()) { - v09Info += 2; - } - } - } return rv; } @@ -3784,8 +3740,6 @@ nsHttpChannel::OnCacheEntryCheck(nsICacheEntry* entry, nsIApplicationCache* appC (!mCachedResponseHead->ExpiresInPast() || !mCachedResponseHead->MustValidateIfExpired())) { LOG(("NOT validating based on isForcedValid being true.\n")); - Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PREFETCHES_USED> used; - ++used; doValidation = false; } // If the LOAD_FROM_CACHE flag is set, any cached data can simply be used @@ -6546,8 +6500,6 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st if (mTimingEnabled && request == mCachePump) { mCacheReadEnd = TimeStamp::Now(); - - ReportNetVSCacheTelemetry(); } // allow content to be cached if it was loaded successfully (bug #482935) @@ -8104,12 +8056,5 @@ nsHttpChannel::SetDoNotTrack() } } - -void -nsHttpChannel::ReportNetVSCacheTelemetry() -{ - /* STUB */ -} - } // namespace net } // namespace mozilla |