Closed Bug 949775 Opened 11 years ago Closed 11 years ago

UITelemetry should drop events on the floor if telemetry is disabled

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: rnewman, Assigned: rnewman)

References

Details

Attachments

(1 file, 1 obsolete file)

No sense building up a big list of events that the user doesn't want to record or submit.
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Comment on attachment 8346934 [details] [diff] [review]
UITelemetry should drop events on the floor if telemetry is disabled.

Just a note. Let's not add UITelemetry.uninit() because:
1. We don't want to add more to browser.js
2. Shutdown will likely never, ever be called in Fx for Android
3. We can just listen for "profile-before-change" which many JSMs use as a "shutdown is near" flag. Some XPCOM components use "xpcom-shutdown" but it fires late and I think "profile-before-change" is more typical for JSM/JS code.

https://developer.mozilla.org/en-US/docs/Observer_Notifications#Application_shutdown
(In reply to Mark Finkle (:mfinkle) from comment #2)

> 3. We can just listen for "profile-before-change" which many JSMs use as a
> "shutdown is near" flag.

WFM!
Attachment #8346934 - Attachment is obsolete: true
Comment on attachment 8347029 [details] [diff] [review]
UITelemetry should drop events on the floor if telemetry is disabled.

Might as well put this in for review, save it from sitting here.
Attachment #8347029 - Flags: review?(mark.finkle)
Comment on attachment 8347029 [details] [diff] [review]
UITelemetry should drop events on the floor if telemetry is disabled.

>diff --git a/toolkit/components/telemetry/UITelemetry.jsm b/toolkit/components/telemetry/UITelemetry.jsm

>+  observe: function(subject, topic, data) {

aSubject, aTopic and aData
(I know you dislike it, but it's the existing style in this file. You can curse me later.)

>+  uninit: function() {
>+  },

Remove
Attachment #8347029 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/integration/fx-team/rev/c4921ed6aef3
Target Milestone: --- → mozilla29
Preprocessing didn't work for some reason, so I backed this out.

https://hg.mozilla.org/integration/fx-team/rev/de09aa9a5c09
Relanded with UITelemetry.jsm added to the preprocessed module list.

https://hg.mozilla.org/integration/fx-team/rev/837203a4e076
https://hg.mozilla.org/mozilla-central/rev/cb31b40dd8f3
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: