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

RESOLVED FIXED

Status

P2
normal
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: evold, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.

Comment 4

5 years ago
(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.

Comment 7

5 years ago
Use PrivateBrowsingUtils.permanentPrivateBrowsing instead. Regardless, modifying the pref outside of startup is unsupported.

Comment 8

5 years ago
(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.
Created attachment 764825 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1042/files

Pointer to Github pull-request
Attachment #764825 - Flags: review?(rFobic)
Attachment #764825 - Flags: feedback?(ehsan)

Comment 11

5 years ago
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+

Updated

5 years ago
Priority: -- → P2
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+

Comment 13

5 years ago
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

Comment 14

5 years ago
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
Last Resolved: 5 years ago
Flags: needinfo?(evold)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.