Closed Bug 795203 Opened 12 years ago Closed 12 years ago

B2g: clear private data: cookies

Categories

(Core :: Networking: Cookies, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18
blocking-basecamp +

People

(Reporter: jduell.mcbugs, Assigned: jduell.mcbugs)

References

Details

(Keywords: feature)

Attachments

(1 file, 1 obsolete file)

Attached patch v1 (obsolete) — Splinter Review
This just switches the cookieSvc to use the "webapps-clear-data" instead of 'webapps-uninstall': the former provides support for both clear data and uninstall (i.e. provides 'browserOnly' flag).

Relies on the NS_GetAppInfoFromClearDataNotification nsNetUtil.h function I'm adding in bug 786299.

Pretty simple patch--not sure if it really needs a cookie peer, honestly.  Just hooking things up to external plumbing...
Attachment #665760 - Flags: review?(mconnor)
Attachment #665760 - Flags: feedback?(mounir)
Comment on attachment 665760 [details] [diff] [review]
v1

Review of attachment 665760 [details] [diff] [review]:
-----------------------------------------------------------------

This is indeed pretty simple. But could you rename AppUninstallObserver to something like ClearAppDataObserver?

::: netwerk/cookie/nsCookieService.cpp
@@ +557,3 @@
>  
>      uint32_t appId;
> +    bool browserOnly = false;

If you initialize browserOnly, you can do that for appId too ;)

@@ +562,5 @@
> +    NS_ENSURE_SUCCESS(rv, rv);
> +
> +    nsCOMPtr<nsICookieManager2> cookieManager
> +      = do_GetService(NS_COOKIEMANAGER_CONTRACTID);
> +    if (cookieManager) {

!cookieManager should not happen. You should at least assert if that happens to be the case.
Attachment #665760 - Flags: feedback?(mounir) → feedback+
Status: NEW → ASSIGNED
blocking-basecamp: --- → ?
Depends on: 794563, 784378
No longer depends on: 786299
Keywords: feature
Version: unspecified → Trunk
BTW, we need tests for that.
Clear private data needs to clear cookies.
blocking-basecamp: ? → +
As mentioned before, mostly external plumbing, so not sure we need full review from cookie peer.  Up to mconnor...
Attachment #665760 - Attachment is obsolete: true
Attachment #665760 - Flags: review?(mconnor)
Attachment #666122 - Flags: review?(mconnor)
Attachment #666122 - Flags: feedback+
Comment on attachment 666122 [details] [diff] [review]
v2: w/mounir's fixes

lgtm, sorry for delay here.
Attachment #666122 - Flags: review?(mconnor) → review+
https://hg.mozilla.org/mozilla-central/rev/29cb1f0d796c
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Jason, this feature should have tests. Do you think you can find cycles to write them?
Flags: in-testsuite?
I've filed bug 799212 for the test.
Blocks: 799212
Blocks: 807059
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: