summaryrefslogtreecommitdiffstats
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/auth/nsAuthGSSAPI.cpp11
-rw-r--r--extensions/auth/nsAuthSSPI.cpp11
-rw-r--r--extensions/auth/nsAuthSambaNTLM.cpp12
-rw-r--r--extensions/cookie/nsPermissionManager.cpp29
4 files changed, 1 insertions, 62 deletions
diff --git a/extensions/auth/nsAuthGSSAPI.cpp b/extensions/auth/nsAuthGSSAPI.cpp
index f63b30eff..0e273a300 100644
--- a/extensions/auth/nsAuthGSSAPI.cpp
+++ b/extensions/auth/nsAuthGSSAPI.cpp
@@ -22,7 +22,6 @@
#include "nsIPrefBranch.h"
#include "nsIServiceManager.h"
#include "nsNativeCharsetUtils.h"
-#include "mozilla/Telemetry.h"
#include "nsAuthGSSAPI.h"
@@ -377,16 +376,6 @@ nsAuthGSSAPI::Init(const char *serviceName,
mServiceName = serviceName;
mServiceFlags = serviceFlags;
- static bool sTelemetrySent = false;
- if (!sTelemetrySent) {
- mozilla::Telemetry::Accumulate(
- mozilla::Telemetry::NTLM_MODULE_USED_2,
- serviceFlags & nsIAuthModule::REQ_PROXY_AUTH
- ? NTLM_MODULE_KERBEROS_PROXY
- : NTLM_MODULE_KERBEROS_DIRECT);
- sTelemetrySent = true;
- }
-
return NS_OK;
}
diff --git a/extensions/auth/nsAuthSSPI.cpp b/extensions/auth/nsAuthSSPI.cpp
index eb577d3bf..677a4773a 100644
--- a/extensions/auth/nsAuthSSPI.cpp
+++ b/extensions/auth/nsAuthSSPI.cpp
@@ -20,7 +20,6 @@
#include "nsNetCID.h"
#include "nsCOMPtr.h"
#include "nsICryptoHash.h"
-#include "mozilla/Telemetry.h"
#include <windows.h>
@@ -275,16 +274,6 @@ nsAuthSSPI::Init(const char *serviceName,
if (rc != SEC_E_OK)
return NS_ERROR_UNEXPECTED;
- static bool sTelemetrySent = false;
- if (!sTelemetrySent) {
- mozilla::Telemetry::Accumulate(
- mozilla::Telemetry::NTLM_MODULE_USED_2,
- serviceFlags & nsIAuthModule::REQ_PROXY_AUTH
- ? NTLM_MODULE_WIN_API_PROXY
- : NTLM_MODULE_WIN_API_DIRECT);
- sTelemetrySent = true;
- }
-
LOG(("AcquireCredentialsHandle() succeeded.\n"));
return NS_OK;
}
diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp
index 69777dcca..6b9204c34 100644
--- a/extensions/auth/nsAuthSambaNTLM.cpp
+++ b/extensions/auth/nsAuthSambaNTLM.cpp
@@ -9,7 +9,6 @@
#include "prenv.h"
#include "plbase64.h"
#include "prerror.h"
-#include "mozilla/Telemetry.h"
#include <stdlib.h>
@@ -212,17 +211,6 @@ nsAuthSambaNTLM::Init(const char *serviceName,
const char16_t *password)
{
NS_ASSERTION(!username && !domain && !password, "unexpected credentials");
-
- static bool sTelemetrySent = false;
- if (!sTelemetrySent) {
- mozilla::Telemetry::Accumulate(
- mozilla::Telemetry::NTLM_MODULE_USED_2,
- serviceFlags & nsIAuthModule::REQ_PROXY_AUTH
- ? NTLM_MODULE_SAMBA_AUTH_PROXY
- : NTLM_MODULE_SAMBA_AUTH_DIRECT);
- sTelemetrySent = true;
- }
-
return NS_OK;
}
diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp
index c44830812..1f3c257dd 100644
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -866,9 +866,6 @@ nsPermissionManager::InitDB(bool aRemoveFile)
if (rv == NS_ERROR_FILE_CORRUPTED) {
LogToConsole(NS_LITERAL_STRING("permissions.sqlite is corrupted! Try again!"));
- // Add telemetry probe
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::PERMISSIONS_SQL_CORRUPTED, 1);
-
// delete corrupted permissions.sqlite and try again
rv = permissionsFile->Remove(false);
NS_ENSURE_SUCCESS(rv, rv);
@@ -891,9 +888,6 @@ nsPermissionManager::InitDB(bool aRemoveFile)
NS_ENSURE_SUCCESS(rv, rv);
LogToConsole(NS_LITERAL_STRING("Defective permissions.sqlite has been removed."));
- // Add telemetry probe
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::DEFECTIVE_PERMISSIONS_SQL_REMOVED, 1);
-
rv = OpenDatabase(permissionsFile);
NS_ENSURE_SUCCESS(rv, rv);
LogToConsole(NS_LITERAL_STRING("OpenDatabase to permissions.sqlite is successful!"));
@@ -1185,25 +1179,7 @@ nsPermissionManager::InitDB(bool aRemoveFile)
if (NS_SUCCEEDED(rv) &&
NS_SUCCEEDED(countStmt->ExecuteStep(&hasResult)) &&
hasResult) {
- int32_t permsCount = countStmt->AsInt32(0);
-
- // The id variable contains the number of rows inserted into the
- // moz_hosts_new table (as one ID was used per entry)
- uint32_t telemetryValue;
- if (permsCount > id) {
- telemetryValue = 3; // NEW > OLD
- } else if (permsCount == id) {
- telemetryValue = 2; // NEW == OLD
- } else if (permsCount == 0) {
- telemetryValue = 0; // NEW = 0
- } else {
- telemetryValue = 1; // NEW < OLD
- }
-
- // Report the telemetry value to telemetry
- mozilla::Telemetry::Accumulate(
- mozilla::Telemetry::PERMISSIONS_REMIGRATION_COMPARISON,
- telemetryValue);
+ // Telemetry STUB (count rows and report)
} else {
NS_WARNING("Could not count the rows in moz_perms");
}
@@ -1221,9 +1197,6 @@ nsPermissionManager::InitDB(bool aRemoveFile)
rv = mDBConn->CommitTransaction();
NS_ENSURE_SUCCESS(rv, rv);
-
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::PERMISSIONS_MIGRATION_7_ERROR,
- NS_WARN_IF(migrationError));
} else {
// We don't have a moz_hosts table, so we create one for downgrading purposes.
// This table is empty.