Bug 1389057 - Inherit NotificationTelemetryService from nsIObserver r=kitcambridge

MozReview-Commit-ID: La4XxSWYljO

--HG--
extra : rebase_source : 457088a7d60016cdfcfcf46baeefb01990ae8207
This commit is contained in:
Swapnesh Kumar Sahoo 2017-08-16 01:24:31 +05:30
parent b94585d30c
commit 04359db9b3
2 changed files with 11 additions and 2 deletions

View File

@ -669,7 +669,7 @@ NotificationPermissionRequest::GetTypes(nsIArray** aTypes)
aTypes);
}
NS_IMPL_ISUPPORTS(NotificationTelemetryService, nsISupports)
NS_IMPL_ISUPPORTS(NotificationTelemetryService, nsIObserver)
NotificationTelemetryService::NotificationTelemetryService()
: mDNDRecorded(false)
@ -799,6 +799,14 @@ NotificationTelemetryService::RecordDNDSupported()
Telemetry::ALERTS_SERVICE_DND_SUPPORTED_FLAG, true);
}
NS_IMETHODIMP
NotificationTelemetryService::Observe(nsISupports* aSubject,
const char* aTopic,
const char16_t* aData)
{
return NS_OK;
}
// Observer that the alert service calls to do common tasks and/or dispatch to the
// specific observer for the context e.g. main thread, worker, or service worker.
class NotificationObserver final : public nsIObserver

View File

@ -52,10 +52,11 @@ public:
// 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 nsISupports
class NotificationTelemetryService final : public nsIObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
NotificationTelemetryService();