New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify ChromeActions.isInPrivateBrowsing to not rely on the global PB service #2498
Conversation
We have many users on the extension on various versions of Firefox so we can't accept something that won't work for older versions of FF. |
This will work on Firefox 13 and newer. Is that not acceptable? |
Firefox 10 esr? |
@ehsan , I cannot verify that PrivateBrowsingUtils exist on FF13, looks like it was introduced only in Firefox 16 https://bugzilla.mozilla.org/show_bug.cgi?id=769467 . Has Seamonkey PrivateBrowsingUtils.isWindowPrivate or nsIPrivateBrowsingService ? |
Sorry, yeah you're right, I was confusing it with the usePrivateBrowsing attribute. PrivateBrowsingUtils is available in all Mozilla based applications includling SeaMonkey and Thunderbird. But the ESR10 compatibility is a good point. Perhaps we can revisit this when ESR17 is released, at which point PrivateBrowsingUtils can be used everywhere safely. |
Firefox passed v17 two versions ago now. What is the status of this patch? |
I think we can take it now. @yurydelendik ? |
Seems fine to take now. Can you de-rot it? |
Done! |
I think |
Simplify ChromeActions.isInPrivateBrowsing to not rely on the global PB service
This addresses the comments that I had on #2481. PrivateBrowsingUtils.isWindowPrivate works fine without throwing in all Firefox versions now, and there is no need for the nsIPrivateBrowsingService fallback any more. Also, it doesn't make sense to cache the result here since isWindowPrivate is not an expensive call. This patch heavily simplifies isInPrivateBrowsing.