Firefox Metro currently does not have private browsing. This task is to add an option and keyboard shortcut to enter private browsing when in Metro XUL Fennec.
The Metro browser should simply be restarted in private browsing mode for now.
I couldn't find an option in IE10 to enter private browsing when in Metro mode, but I could find an option to do this in Metro Chrome.

I figured simply restarting the browser with firefox.exe -private would be a straightforward and fast implementation, but if you have a better suggestion please share.
I'm not familiar with private browsing code yet, but I know you are :)

(In reply to comment #4)
> There is only 1 Window in Metro mode.
Yes. What I meant was that it would be way easier to implement this on top of the infrastructure that we're working on for per-window PB.

(In reply to comment #6)
> Is there enough of that new infrastructure landed already that I (or someone
> else) can work on this? If not, do you know when that will be ready?
Not yet. The timeline is not clear. We currently don't have anybody working on this, and are getting contributions from the community. Chris Lord wanted to work on this as a prerequisite for the mobile PB mode, but I think he's now pulled off into other projects. :(

(In reply to comment #8)
> Are you opposed to me filing another bug to do the post new infrastructure work
> in a new bug, and using this one to restart the browser in PB mode?
Yes, I don't think that's the direction that we want to take. I'm fine with you landing your changes here hidden behind MOZ_PER_WINDOW_PRIVATE_BROWSING which is not defined yet. Not sure how much that helps you.
What's the timeline for this work from a Firefox Metro perspective?

(In reply to Ehsan Akhgari [:ehsan] from comment #7)
> (In reply to comment #6)
> > Is there enough of that new infrastructure landed already that I (or someone
> > else) can work on this? If not, do you know when that will be ready?
>
> Not yet. The timeline is not clear. We currently don't have anybody
> working on this, and are getting contributions from the community. Chris
> Lord wanted to work on this as a prerequisite for the mobile PB mode, but I
> think he's now pulled off into other projects. :(
I must apologise for jumping the gun a bit, I assumed that my work on bug 758620 would be over pretty quickly, but the problems it caused/exposed took a while to sort out. I'm hoping that with bug 769541 looking like it's finally fixed, I'll actually be able to start work on this properly, but I'll be away for a week and a half from Wednesday, so I won't seriously be able to start before then.
Until then, don't let me block anything, but I really ought to be able to start working on this properly come August 6th.

> What's the timeline for this work from a Firefox Metro perspective?
There's no detailed requirements. I think Windows 8 should be released at the end of October. The goals list have alpha/beta by the end of the year. https://wiki.mozilla.org/Firefox/Roadmap> I'm fine with you landing your changes here hidden behind
> MOZ_PER_WINDOW_PRIVATE_BROWSING which is not defined yet.
I'd rather wait in that case.

According to https://wiki.mozilla.org/RapidRelease/Calendar, shipping something in beta by the end of the year corresponds to Firefox 18, so we still have a bit of time. But if/when this becomes a priority, please check back with me, as we might need to get somebody working on this full-time (assuming that Chris would get pulled into other projects...)
Sorry for being so strict here, but I don't want us to resort to a hack (restarting the browser) until we absolutely have to... :/

(In reply to comment #15)
> Would we need multi window support in order to consume the new work being done
> for private browsing per window? Can we do it per tab easily?
The new API is per-docshell. While Firefox Desktop would not have the UI for this, it is possible to get it to work per-tab.

(In reply to comment #18)
> This can be implemented now right Ehsan?
Yeah, but I'd like us to sit down some time and have a chat about this so that everybody knows where we're going and what we need to do.

Created attachment 8356806[details][diff][review]
prototype code
Here's a patch that adds a "new private tab" button in the Metro tab strip. This is nowhere close to the final UX, and it is missing some vital privacy pieces like integration with sessionstore. However, it could be useful if you want to test how the platform feature works when running in the Metro UI.

Created attachment 8358579[details][diff][review]
WIP
Here's a slightly more complete patch, which adds proper session store support, a keyboard shortcut, makes new tabs inherit the private state from the parent tab if there is one, and adds a pref to hide the (incomplete) UI by default.