From:  Brian Smith <brian@briansmith.org>
Date:  19 Aug 2013 08:19:24 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.network
Subject:  

Re: Forcing every request from a docShell to use LOAD_ANONYMOUS

NNTP-Posting-Host:  63.245.216.66

On Fri, Aug 16, 2013 at 4:29 PM, Mark Hammond 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  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