Closed Bug 878131 Opened 11 years ago Closed 11 years ago

isPrivate() should return true if the new global private browsing mode is enabled

Categories

(Add-on SDK Graveyard :: General, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: evold, Unassigned)

Details

Attachments

(1 file)

There is a new global private browsing mode that was implemented quietly that I only learned about yesterday.

This one requires a restart to enable/disable so it's even more strict than the previous global private browsing service was.

Basically isPrivate() should always return true now if this is enabled..
Btw this global pb mode is already on release, go to preferences -> privacy -> history -> custom and you will see it.
A think at last triage meeting we decided to take this discussion to a broader audience, primarily to understand UX perspective on this subject.
I'll email people and get some feedback for us on what the intention here was.
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #0)
> There is a new global private browsing mode that was implemented quietly
> that I only learned about yesterday.

This is a very misleading statement.  This was not implemented quietly, and has been supported since Firefox 3.5.

> This one requires a restart to enable/disable so it's even more strict than
> the previous global private browsing service was.
> 
> Basically isPrivate() should always return true now if this is enabled..

Yes, that's correct.
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #4)
> (In reply to Erik Vold [:erikvold] [:ztatic] from comment #0)
> > There is a new global private browsing mode that was implemented quietly
> > that I only learned about yesterday.
> 
> This is a very misleading statement.  This was not implemented quietly, and
> has been supported since Firefox 3.5.

Sorry I meant re-implemented.
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #4)
> (In reply to Erik Vold [:erikvold] [:ztatic] from comment #0)
> > Basically isPrivate() should always return true now if this is enabled..
> 
> Yes, that's correct.

So isPrivate should return the value of browser.privatebrowsing.autostart by default?  or is there something better that I am missing?

Using browser.privatebrowsing.autostart seems hairy since it can be changed without a restart and from what I can tell affects new windows.
Use PrivateBrowsingUtils.permanentPrivateBrowsing instead. Regardless, modifying the pref outside of startup is unsupported.
(In reply to comment #7)
> Use PrivateBrowsingUtils.permanentPrivateBrowsing instead. Regardless,
> modifying the pref outside of startup is unsupported.

isPrivate is read-only, right?
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #8)
> (In reply to comment #7)
> > Use PrivateBrowsingUtils.permanentPrivateBrowsing instead. Regardless,
> > modifying the pref outside of startup is unsupported.
> 
> isPrivate is read-only, right?

Our require('sdk/private-browsing').isPrivate(thing?) method is read only yes.

Everything else exported from require('sdk/private-browsing') is deprecated and only works with the global pb service.
Attachment #764825 - Flags: review?(rFobic)
Attachment #764825 - Flags: feedback?(ehsan)
Comment on attachment 764825 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1042/files

Looks good.  I think you can drop the "!!" as I mentioned on github.
Attachment #764825 - Flags: feedback?(ehsan) → feedback+
Comment on attachment 764825 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1042/files

Thanks
Attachment #764825 - Flags: review?(rFobic) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/90762ccf69007431ceeaaae609014f661f8ebd38
Bug 878131: isPrivate() now always returns true if the new global pb service is enabled

https://github.com/mozilla/addon-sdk/commit/5acefbc7605e6bbe5e1fb084c0aacf110c68793a
Merge pull request #1042 from erikvold/878131

Bug 878131: isPrivate() now always returns true if the new global pb service is enabled r=@Gozala
Commits pushed to australis at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/90762ccf69007431ceeaaae609014f661f8ebd38
Bug 878131: isPrivate() now always returns true if the new global pb service is enabled

https://github.com/mozilla/addon-sdk/commit/5acefbc7605e6bbe5e1fb084c0aacf110c68793a
Merge pull request #1042 from erikvold/878131
I'm going through the list of open bugs that github robot has commented in. Is this bug fixed, Erik?
Flags: needinfo?(evold)
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(evold)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: