Loading toolkit/components/telemetry/Makefile.in +4 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,10 @@ EXTRA_DSO_LDOPTS += \ TEST_DIRS += tests ifdef MOZILLA_OFFICIAL DEFINES += -DMOZILLA_OFFICIAL endif include $(topsrcdir)/config/config.mk include $(topsrcdir)/config/rules.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk toolkit/components/telemetry/Telemetry.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -694,6 +694,16 @@ TelemetryImpl::CanRecord() { return !sTelemetry || sTelemetry->mCanRecord; } NS_IMETHODIMP TelemetryImpl::GetCanSend(bool *ret) { #if defined(MOZILLA_OFFICIAL) && defined(MOZ_TELEMETRY_REPORTING) *ret = true; #else *ret = false; #endif return NS_OK; } already_AddRefed<nsITelemetry> TelemetryImpl::CreateTelemetryInstance() { Loading toolkit/components/telemetry/TelemetryPing.js +4 −1 Original line number Diff line number Diff line Loading @@ -573,7 +573,10 @@ TelemetryPing.prototype = { idleService.removeIdleObserver(this, IDLE_TIMEOUT_SECONDS); this._isIdleObserver = false; } this.send(aTopic == "idle" ? "idle-daily" : aTopic, server); reason = (Telemetry.canSend && aTopic == "idle" ? "idle-daily" : "test-ping"); this.send(reason, server); break; } }, Loading toolkit/components/telemetry/nsITelemetry.idl +5 −0 Original line number Diff line number Diff line Loading @@ -131,4 +131,9 @@ interface nsITelemetry : nsISupports * Set this to false to disable gathering of telemetry statistics. */ attribute boolean canRecord; /** * A flag indicating whether Telemetry can submit official results. */ readonly attribute boolean canSend; }; Loading
toolkit/components/telemetry/Makefile.in +4 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,10 @@ EXTRA_DSO_LDOPTS += \ TEST_DIRS += tests ifdef MOZILLA_OFFICIAL DEFINES += -DMOZILLA_OFFICIAL endif include $(topsrcdir)/config/config.mk include $(topsrcdir)/config/rules.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk
toolkit/components/telemetry/Telemetry.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -694,6 +694,16 @@ TelemetryImpl::CanRecord() { return !sTelemetry || sTelemetry->mCanRecord; } NS_IMETHODIMP TelemetryImpl::GetCanSend(bool *ret) { #if defined(MOZILLA_OFFICIAL) && defined(MOZ_TELEMETRY_REPORTING) *ret = true; #else *ret = false; #endif return NS_OK; } already_AddRefed<nsITelemetry> TelemetryImpl::CreateTelemetryInstance() { Loading
toolkit/components/telemetry/TelemetryPing.js +4 −1 Original line number Diff line number Diff line Loading @@ -573,7 +573,10 @@ TelemetryPing.prototype = { idleService.removeIdleObserver(this, IDLE_TIMEOUT_SECONDS); this._isIdleObserver = false; } this.send(aTopic == "idle" ? "idle-daily" : aTopic, server); reason = (Telemetry.canSend && aTopic == "idle" ? "idle-daily" : "test-ping"); this.send(reason, server); break; } }, Loading
toolkit/components/telemetry/nsITelemetry.idl +5 −0 Original line number Diff line number Diff line Loading @@ -131,4 +131,9 @@ interface nsITelemetry : nsISupports * Set this to false to disable gathering of telemetry statistics. */ attribute boolean canRecord; /** * A flag indicating whether Telemetry can submit official results. */ readonly attribute boolean canSend; };