Telemetry: Remove stubs and related code

This commit is contained in:
adeshkp 2019-01-12 06:20:31 -05:00 • committed by Roy Tam
commit aea50f182f
134 changed files with 68 additions and 3422 deletions

View file

@ -18,9 +18,6 @@
#include "nsTHashtable.h"
#include "nsWeakReference.h"
#define NOTIFICATIONTELEMETRYSERVICE_CONTRACTID \
"@mozilla.org/notificationTelemetryService;1"
class nsIPrincipal;
class nsIVariant;
@ -49,36 +46,6 @@ public:
Notify(workers::Status aStatus) override;
};
// Records telemetry probes at application startup, when a notification is
// shown, and when the notification permission is revoked for a site.
class NotificationTelemetryService final : public nsIObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
NotificationTelemetryService();
static already_AddRefed<NotificationTelemetryService> GetInstance();
nsresult Init();
void RecordDNDSupported();
void RecordPermissions();
nsresult RecordSender(nsIPrincipal* aPrincipal);
private:
virtual ~NotificationTelemetryService();
nsresult AddPermissionChangeObserver();
nsresult RemovePermissionChangeObserver();
bool GetNotificationPermission(nsISupports* aSupports,
uint32_t* aCapability);
bool mDNDRecorded;
nsTHashtable<nsStringHashKey> mOrigins;
};
/*
* Notifications on workers introduce some lifetime issues. The property we
* are trying to satisfy is:
@ -143,7 +110,6 @@ class Notification : public DOMEventTargetHelper
friend class ServiceWorkerNotificationObserver;
friend class WorkerGetRunnable;
friend class WorkerNotificationObserver;
friend class NotificationTelemetryService;
public:
IMPL_EVENT_HANDLER(click)