Closed
Bug 1191336
Opened 9 years ago
Closed 9 years ago
Don't show the datachoices infobar when sending deletion pings
Categories
(Toolkit :: Telemetry, defect)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
mozilla42
People
(Reporter: Dexter, Assigned: gfritzsche)
References
Details
(Whiteboard: [unifiedTelemetry])
Attachments
(2 files, 5 obsolete files)
3.66 KB,
patch
|
gfritzsche
:
review+
|
Details | Diff | Splinter Review |
8.97 KB,
patch
|
gfritzsche
:
review+
|
Details | Diff | Splinter Review |
When sending a deletion ping on the first run, if the infobar wasn't shown already, disabling datareporting.healthreport.uploadEnabled immediately triggers the infobar. This happens because disabling upload generates a deletion ping that needs to be sent to the servers. FHR doesn't show the data choices infobar when sending deletion requests.
Reporter | ||
Updated•9 years ago
|
Reporter | ||
Comment 1•9 years ago
|
||
Assignee: nobody → alessio.placitelli
Status: NEW → ASSIGNED
Attachment #8644412 -
Flags: review?(gfritzsche)
Reporter | ||
Updated•9 years ago
|
Attachment #8644412 -
Flags: review?(gfritzsche)
Reporter | ||
Comment 2•9 years ago
|
||
Reporter | ||
Comment 3•9 years ago
|
||
Attachment #8644412 -
Attachment is obsolete: true
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8644954 [details] [diff] [review] part 2 - Don't show the infobar when checking if user can upload Review of attachment 8644954 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/base/content/test/general/browser_datachoices_notification.js @@ +133,5 @@ > Assert.ok(!TelemetryReportingPolicy.canUpload(), > + "User should not be allowed to upload."); > + > + // Trigger the infobar. > + TelemetryReportingPolicy.testShowInfobar(); Lets trigger the timer this waits on instead using a policy object. Ditto below. ::: toolkit/components/telemetry/TelemetryReportingPolicy.jsm @@ +158,5 @@ > > /** > + * Test only method, used to show the infobar. > + */ > + testShowInfobar: function() { We don't need this, we can just trigger the timers directly here similar to other Telemetry test. @@ +345,5 @@ > } > > + // Submission is enabled. We enable upload if user is notified or we need to bypass > + // the policy. > + const BYPASS_NOTIFICATION = Preferences.get(PREF_BYPASS_NOTIFICATION, false); Nit: const bypass = ... @@ +361,5 @@ > }, > > /** > * Make sure the user is notified about the policy before allowing upload. > * @return {Boolean} True if the user was notified, false otherwise. Update this.
Attachment #8644954 -
Flags: feedback+
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8644983 [details] [diff] [review] part 1 - Allow deletion pings to be sent w/o prompting the datachoices infobar Review of attachment 8644983 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/telemetry/TelemetrySend.jsm @@ +676,5 @@ > + if (isDeletionPing(ping)) { > + return TelemetryStorage.saveDeletionPing(ping); > + } else { > + return TelemetryStorage.savePendingPing(ping); > + } This is duplicated below and in sendPings(), let's move this to a helper function.
Attachment #8644983 -
Flags: review+
Reporter | ||
Comment 6•9 years ago
|
||
Attachment #8644983 -
Attachment is obsolete: true
Attachment #8645036 -
Flags: review+
Reporter | ||
Comment 7•9 years ago
|
||
Attachment #8644954 -
Attachment is obsolete: true
Attachment #8645051 -
Flags: review?(gfritzsche)
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8645051 [details] [diff] [review] part 2 - Don't show the infobar when checking if user can upload - v2 Review of attachment 8645051 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/base/content/test/general/browser_datachoices_notification.js @@ +146,4 @@ > Assert.ok(!TelemetryReportingPolicy.canUpload(), > + "User should not be allowed to upload."); > + > + // Trigger the infobar. This section is duplicated below, lets move it to a helper function triggerInfoBar(expectedTimeout) or so. @@ +149,5 @@ > + // Trigger the infobar. > + let showInfobarCallback = null; > + fakeShowPolicyTimeout((callback, timeout) => showInfobarCallback = callback, () => {}); > + sendSessionRestoredNotification(); > + Assert.ok(!!showInfobarCallback, "Must have a timer callback.") While we are here, we should also check the timeout being correct.
Attachment #8645051 -
Flags: review?(gfritzsche) → review+
Assignee | ||
Comment 9•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: alessio.placitelli → gfritzsche
Assignee | ||
Comment 10•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8645063 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Attachment #8645064 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Attachment #8645036 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8645051 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8886969b66fe
Comment 12•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/20565e58ac99 https://hg.mozilla.org/integration/fx-team/rev/f63aa8d0a399
Comment 13•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/20565e58ac99 https://hg.mozilla.org/mozilla-central/rev/f63aa8d0a399
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•