Closed Bug 1170115 Opened 9 years ago Closed 9 years ago

listen to clear-origin-data in PushService

Categories

(Core :: DOM: Push Subscriptions, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox41 --- affected
firefox45 --- fixed

People

(Reporter: allstars.chh, Assigned: lina)

References

Details

Attachments

(1 file, 1 obsolete file)

In Bug 1168300 we will add "webapps-clear-cookiejar-data" notification, so PushService should listen to this event instead of listening "webapps-clear-data"
Summary: listen to webapps-clear-cookiejar-data → listen to webapps-clear-cookiejar-data in PushService
Depends on: 1196512
Assignee: nobody → kcambridge
Summary: listen to webapps-clear-cookiejar-data in PushService → listen to clear-origin-data in PushService
Bug 1170115 - Replace `webapps-clear-data` with `clear-origin-data` in Push. r?allstars.chh
Attachment #8686695 - Flags: review?(allstars.chh)
Comment on attachment 8686695 [details] MozReview Request: Bug 1170115 - Use `clear-origin-data` to remove Push records. r?allstars.chh https://reviewboard.mozilla.org/r/25043/#review22625 ::: dom/push/test/xpcshell/test_clear_origin_data.js:1 (Diff revision 1) > +/* Any copyright is dedicated to the Public Domain. Shouldn't this use a 'hg mv'? ::: dom/push/test/xpcshell/test_clear_origin_data.js:71 (Diff revision 1) > + let data = JSON.stringify({ appId: 1, inBrowser: false }); nit, 'inBrowser: false' could be removed. ::: dom/push/test/xpcshell/test_clear_origin_data.js:83 (Diff revision 1) > + ok(registration, 'Registration for { 1, true } should still exist.'); when we clear registration for {appId : 1} we should clear all registrations with appId :1, for example, {app:1. inBrowser: true}, {app:1. inBrowser: false} should be removed. That's the idea of ChromeUtils.originAttributesMatchPattern ::: dom/push/test/xpcshell/xpcshell.ini:41 (Diff revision 1) > -[test_webapps_cleardata.js] > +[test_clear_origin_data.js] nit, should list alphabetically.
Attachment #8686695 - Flags: review?(allstars.chh)
https://reviewboard.mozilla.org/r/25043/#review22625 > when we clear registration for {appId : 1} > we should clear all registrations with appId :1, > for example, > {app:1. inBrowser: true}, {app:1. inBrowser: false} should be removed. > > That's the idea of ChromeUtils.originAttributesMatchPattern Thanks, Yoshi! I'll add a few more test cases for different patterns, but `ChromeUtils.originAttributesMatchPattern({ appId: 1, inBrowser: true }, { appId: 1, inBrowser: false }) === false`. (Though `ChromeUtils.originAttributesMatchPattern({ appId: 1, inBrowser: true }, { appId: 1 }) === true`).
Comment on attachment 8686695 [details] MozReview Request: Bug 1170115 - Use `clear-origin-data` to remove Push records. r?allstars.chh Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25043/diff/1-2/
Attachment #8686695 - Attachment description: MozReview Request: Bug 1170115 - Replace `webapps-clear-data` with `clear-origin-data` in Push. r?allstars.chh → MozReview Request: Bug 1170115 - Use `clear-origin-data` to remove Push records. r?allstars.chh
Attachment #8686695 - Flags: review?(allstars.chh)
Comment on attachment 8686695 [details] MozReview Request: Bug 1170115 - Use `clear-origin-data` to remove Push records. r?allstars.chh https://reviewboard.mozilla.org/r/25043/#review22827 Thanks ::: dom/push/test/xpcshell/test_clear_origin_data.js:16 (Diff revision 2) > + let attributesString = ChromeUtils.originAttributesToSuffix( usually we call this 'suffix' or 'origin suffix'.
Attachment #8686695 - Flags: review?(allstars.chh) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Depends on: 1233136
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: