Re: Forcing every request from a docShell to use LOAD_ANONYMOUS

Brian Smith <[email protected]> Sun, 18 Aug 2013 17:19:24 -0700
Newsgroups gmane.comp.mozilla.devel.netlib
Message-ID <CAFewVt5SwF3km0YjNsSWkG0oFDa54cfiw48BC1P8y5hnCHGA6g@mail.gmail.com>
On Fri, Aug 16, 2013 at 4:29 PM, Mark Hammond <[email protected]>wrote:

> On 17/08/2013 3:57 AM, Christian Biesinger wrote:
>
>> I'm having trouble following the initial question. What does it mean
>> for a request to be "made via the docshell"?
>>
>
> Made via one specific docShell.  We create a <browser> element that will
> be used only to process a queue of URLs we want to thumbnail.  We want
> every request processed by the docShell associated with this browser to
> have the LOAD_ANONYMOUS flag.
>
> Does that clarify?
>

If I were to attempt this, I would follow the example here:
https://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp?rev=9fd000703ace#9426

i.e. I would set a flag/property on the docshell and then I would modify
DoURILoad to check that flag (on the current docshell, and on the parent)
and set the LOAD_ANONYMOUS flag on the channel as needed.

Cheers,
Brian