Hi Baku,

thank you for all the work on this. For completeness sake I would like to
mention that we are adapting to this new (and finally explicit!) cookie
preferences user experience in
https://bugzilla.mozilla.org/show_bug.cgi?id=1526075, where users are given
the choice to reload their tabs so that the new CookieSettings can be
picked up.

And, just to clarify, CookieSettings is not for use in browser front-end
code, right? So, about:preferences for example would still continue to flip
prefs and CookieSettings would reflect those prefs per document?

Thanks!

Johann

On Tue, Mar 12, 2019 at 12:17 PM Andrea Marchesini <amarches...@mozilla.com>
wrote:

> Since the beginning of this week, we have CookieSettings in our codebase.
> CookieSettings is a snapshot of cookie policy and cookie permissions in a
> precise moment of time. This object is used by top-level documents to have
> a consistent cookie configuration also in case the user changes it. New
> cookie configurations will apply only to new top-level documents.
>
> I wrote a long comment describing how this object is created, used and
> propagated:
>
> https://searchfox.org/mozilla-central/rev/8ff2cd0a27e3764d9540abdc5a66b2fb1e4e9644/netwerk/cookie/CookieSettings.h#20-100
>
> CookieSettings has been introduced by bug 1525245 after the discussion
> about "Cookie policy/permission in live documents". See
>
> https://groups.google.com/d/msg/mozilla.dev.platform/qO6MserGVmk/vYHcDMdPCgAJ
>
> Please, don't check the cookie behavior pref or cookie permissions directly
> but use CookieSettings instead. This is available from Document,
> WorkerPrivate and nsILoadInfo.
>
> An interesting aspect of CookieSettings is that is propagated and used
> everywhere (as I said, documents, workers and network channels). This makes
> it a good candidate to bring more prefs and more permissions into it and,
> maybe, change them for specific contexts.  Below I shortly describe 2
> ideas:
>
> - change the network settings when the URL-Classifier flags a document's
> channel. This would allow us, for instance, to have custom network proxy
> configuration for trackers. I have a proof of concept for this idea.
> - custom audio settings: origin A is muted by default, origin B has volume
> set to 0.5. See:
>
> https://searchfox.org/mozilla-central/rev/8ff2cd0a27e3764d9540abdc5a66b2fb1e4e9644/dom/interfaces/base/nsIDOMWindowUtils.idl#1746-1757
>
> b
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to