summaryrefslogtreecommitdiffstats
path: root/netwerk/cookie/nsCookieService.cpp
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 /netwerk/cookie/nsCookieService.cpp
parent45f9a0daad81d1c6a1188b3473e5f0c67d27c0aa (diff)
downloadUXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.gz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.lz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.xz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.zip
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 'netwerk/cookie/nsCookieService.cpp')
-rw-r--r--netwerk/cookie/nsCookieService.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp
index 1c4e5e740..52558107b 100644
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -3325,11 +3325,6 @@ nsCookieService::SetCookieInternal(nsIURI *aHostURI,
// 3 = secure and "https:"
bool isHTTPS;
nsresult rv = aHostURI->SchemeIs("https", &isHTTPS);
- if (NS_SUCCEEDED(rv)) {
- Telemetry::Accumulate(Telemetry::COOKIE_SCHEME_SECURITY,
- ((cookieAttributes.isSecure)? 0x02 : 0x00) |
- ((isHTTPS)? 0x01 : 0x00));
- }
int64_t currentTimeInUsec = PR_Now();
@@ -3480,8 +3475,6 @@ nsCookieService::AddInternal(const nsCookieKey &aKey,
if (mLeaveSecureAlone && aCookie->IsSecure() && !isSecure) {
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader,
"non-https cookie can't set secure flag");
- Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE,
- BLOCKED_SECURE_SET_FROM_HTTP);
return;
}
nsListIter exactIter;
@@ -3502,14 +3495,7 @@ nsCookieService::AddInternal(const nsCookieKey &aKey,
if (!isSecure) {
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader,
"cookie can't save because older cookie is secure cookie but newer cookie is non-secure cookie");
- Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE,
- BLOCKED_DOWNGRADE_SECURE);
return;
- } else {
- // A secure site is allowed to downgrade a secure cookie
- // but we want to measure anyway
- Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE,
- DOWNGRADE_SECURE_FROM_SECURE);
}
}
}
@@ -3609,8 +3595,6 @@ nsCookieService::AddInternal(const nsCookieKey &aKey,
// It's valid to evict a secure cookie for another secure cookie.
oldestCookieTime = FindStaleCookie(entry, currentTime, aHostURI, Some(true), iter);
} else {
- Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE,
- EVICTING_SECURE_BLOCKED);
COOKIE_LOGEVICTED(aCookie,
"Too many cookies for this domain and the new cookie is not a secure cookie");
return;
@@ -4651,19 +4635,7 @@ void
nsCookieService::TelemetryForEvictingStaleCookie(nsCookie *aEvicted,
int64_t oldestCookieTime)
{
- // We need to record the evicting cookie to telemetry.
- if (!aEvicted->IsSecure()) {
- if (aEvicted->LastAccessed() > oldestCookieTime) {
- Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE,
- EVICTED_NEWER_INSECURE);
- } else {
- Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE,
- EVICTED_OLDEST_COOKIE);
- }
- } else {
- Telemetry::Accumulate(Telemetry::COOKIE_LEAVE_SECURE_ALONE,
- EVICTED_PREFERRED_COOKIE);
- }
+ /* STUB */
}
// count the number of cookies stored by a particular host. this is provided by the