Closed
Bug 1376991
Opened 7 years ago
Closed 7 years ago
Extend browsingData to support removing cookies by host
Categories
(WebExtensions :: General, enhancement)
WebExtensions
General
Tracking
(firefox56 fixed)
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: wisniewskit, Assigned: wisniewskit)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 3 obsolete files)
This was split off from bug 1340511, in the interest of getting support for cookies implemented separately from localStorage and indexedDB.
Assignee | ||
Comment 1•7 years ago
|
||
I had some time today, so here's a patch containing just the cookie-related bits from my patch in the original bug, cleaned up and now with test cases.
Assignee: nobody → wisniewskit
Status: NEW → ASSIGNED
Attachment #8882027 -
Flags: review?(mixedpuppy)
Assignee | ||
Comment 2•7 years ago
|
||
Sorry for the churn, but looking at the patch again today with fresh eyes I see that the logic when both "hostnames" and "since" are provided was not doing what one would probably expect (that is, to clear just those cookies "since" the time for the listed "hostnames"). Here's a new version of the patch which does that (including a related test).
Attachment #8882027 -
Attachment is obsolete: true
Attachment #8882027 -
Flags: review?(mixedpuppy)
Attachment #8882206 -
Flags: review?(mixedpuppy)
Assignee | ||
Comment 4•7 years ago
|
||
Comment on attachment 8882206 [details] [diff] [review]
1376991-extend_browsingData_to_restrict_removing_cookies_to_given_hostnames.diff
Sure! It's at https://reviewboard.mozilla.org/r/153540
Attachment #8882206 -
Attachment is obsolete: true
Flags: needinfo?(wisniewskit)
Attachment #8882206 -
Flags: review?(mixedpuppy)
Comment hidden (mozreview-request) |
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8882414 [details]
Bug 1376991 - Extend browsingData to restrict removing cookies to a give list of hostnames;
https://reviewboard.mozilla.org/r/153540/#review158710
Attachment #8882414 -
Flags: review?(mixedpuppy) → review+
Assignee | ||
Comment 7•7 years ago
|
||
Thanks for the review. I'm doing a try-run before requesting check-in: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bb0e95d91b4fe293b33c452f6c0ccec6f5517aaa
Comment hidden (mozreview-request) |
Assignee | ||
Comment 9•7 years ago
|
||
I pushed 2 small tweaks to make it pass try. A new run seems fine: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e8dfdbc4bb7f18f329f83e8f8854f4cd0bff99f4
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8882540 [details]
Fixes for try run failures
https://reviewboard.mozilla.org/r/153656/#review159628
this is fine, just roll it into the original patch
Attachment #8882540 -
Flags: review+
Assignee | ||
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8882414 [details]
Bug 1376991 - Extend browsingData to restrict removing cookies to a give list of hostnames;
https://reviewboard.mozilla.org/r/153540/#review159658
Carrying over r+.
Attachment #8882414 -
Flags: review+
Assignee | ||
Comment 12•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8882414 [details]
Bug 1376991 - Extend browsingData to restrict removing cookies to a give list of hostnames;
https://reviewboard.mozilla.org/r/153540/#review158710
I just made a couple of minor tweaks to account for straightforward failures on the try-run (an eslint fix and clearing the cookies before tests). A new try-run seems fine: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e8dfdbc4bb7f18f329f83e8f8854f4cd0bff99f4
Assignee | ||
Updated•7 years ago
|
Attachment #8882540 -
Attachment is obsolete: true
Assignee | ||
Comment 13•7 years ago
|
||
Alright, I've folded my follow-up patch into the original after getting the go-ahead from :mixedpuppy on IRC. Carrying over r+ and requesting checkin for the final patch.
Keywords: checkin-needed
Comment 14•7 years ago
|
||
MozReview is still showing your fix-up commit (and Autoland wants to push it as a result). Please try to clean that up.
Keywords: checkin-needed
Assignee | ||
Comment 15•7 years ago
|
||
>MozReview is still showing your fix-up commit (and Autoland wants to push it as a result). Please try to clean that up.
Sorry to bug you about it, but how would I do that? I've twice "finished the review" and "discarded" it, but I don't see any "drop this patch" type of option in MozReview, so I'm stuck (and no one seems to be on #mozreview right now). Is there someone else I should ping to find out?
Flags: needinfo?(ryanvm)
Comment 17•7 years ago
|
||
Hi Thomas, you need to rebase your commits to merge them together (it doesn't look like the first commit includes the fixes in the second commit). There are a few ways to do this; probably the easiest is "hg histedit <parent>" where <parent> is the commit you based your first patch on ("hg log --graph" should show this clearly). Then you can change the second commit from "pick" to "fold", and it will be combined into the first one. Then push it up for review again (MozReview will understand that the second commit has been dropped and will remove the patch accordingly).
Flags: needinfo?(mcote)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 19•7 years ago
|
||
Thanks, mcote! It looks like that did the trick. Re-requesting checkin.
Keywords: checkin-needed
Comment 20•7 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5394bfb80035
Extend browsingData to restrict removing cookies to a give list of hostnames; r=mixedpuppy
Keywords: checkin-needed
Comment 21•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•7 years ago
|
Keywords: dev-doc-needed
Comment 22•7 years ago
|
||
Docs: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browsingData/RemovalOptions
Please let me now if this covers it!
Flags: needinfo?(wisniewskit)
Assignee | ||
Comment 23•7 years ago
|
||
Looks good, thanks, but two additional things might be worth mentioning in advance:
1. You must pass in *just* a hostname for every array element, no protocol/etc (for example, having an element "http://www.google.com" will throw an exception; use just "www.google.com" instead). This code snippet may help with that: hostname = new URL(rawUrl).hostname
2. Passing in a top-level domain like "google.com" will not remove sub-domain cookies as well (like those from "www.google.com"). You must explicitly list all of the domains.
Flags: needinfo?(wisniewskit)
Comment 24•7 years ago
|
||
Thanks, that's very good info to add. I've updated the page. I'm marking this dev-doc-complete, but please let me know if there's anything else needed.
Updated•7 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•