Installer, post-update, and installer support for Private Browsing enhancements
Categories
(Firefox :: Installer, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: bhearsum, Assigned: bhearsum)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidedi-pbm])
Attachments
(1 file, 7 obsolete files)
We'll be using the new AUMID and ProgIDs to allow Private Browsing to have it's open shortcuts, Taskbar pins, and have it set as the default browser. Any AUMID or ProgID related set-up (mostly registry entries) will need to additionally create Private Browsing entries.
Notably, we will not be doing any shortcut creation for Private Browsing mode here, as this is an optional feature that users will opt into during onboarding.
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Assignee | ||
Comment 2•1 year ago
|
||
I think much of this is largely straightforward, such as calling SetStartMenuInternet a second time to deal with creating Private Browsing registry keys. The interesting parts are:
- Adding
-private-window
for launch commands - Adding /PrivateMode to the helper, to ensure we can do things such as /SetAsDefaultAppUser for private browsing mode
- Ensuring
Software\Classes\Applications\${FileMainEXE}
is only updating once between both invocations
Depends on D136899
Assignee | ||
Comment 3•1 year ago
|
||
In an ideal world, we'd change the WDBA to handle multiple AUMIDs, but this is the more expedient path, and probably cheap enough to be fine.
Depends on D136900
Assignee | ||
Comment 4•1 year ago
|
||
This is really just a giant TODO until I sort out how to accurately find the localized shortcuts.
Depends on D136901
Assignee | ||
Comment 5•1 year ago
|
||
I believe this is largely straightforward -- mostly doing what we currently do a second time for this AUMID. The main thing of note is that the launch commands for protocol & file handlers use -private-window
for Private Browsing instead of -url
.
Depends on D136902
Assignee | ||
Comment 6•1 year ago
|
||
This still needs a bit of work. It's unclear to me whether we ever should Private Browsing to the taskbar in the installer, and whether or not there's even any value in doing so in post-update (I'm pretty sure we want to when the helper is invoked with /SetAsDefaultAppUser, though).
Depends on D136903
Assignee | ||
Comment 7•1 year ago
|
||
Mostly a duplication of existing code that deals with removing registry entries, etc.
One notable part of this is that it skips the uninstall ping for the new AUMID. I couldn't come up with a compelling reason why we'd want to send it.
Depends on D136904
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 8•1 year ago
|
||
There's a few things we can test here before we do any in-product work. Specifically that:
- Private and non-private mode can be set set as the default browser
- Private and non-private mode are both available as File & Protocol handlers (all versions)
- Private Browsing is available as an option in the "Open With..." context menu for html and other file types
There's a few rough edges here at the moment that I'm still trying to work through -- but most of this works. The things I'm still working through are:
- Firefox doesn't show up in the Windows 10 "Default Apps" (but it does show up if you drill down to "apps by file type", "apps by protocol", or "defaults by app")
- Private and non-private mode are showing the same strings and icons in most places on Windows 10, and in a couple of places on Windows 7.
- Only one Firefox entry is shown in the "Open with..." context menu.
A build with the current code can be found here: https://treeherder.mozilla.org/jobs?repo=try&revision=4ec4feb56c24fb7c82ef39fa125f50c688b9f541&selectedTaskRun=fMhr7G6zR5K5X6xDpUYTyw.0
Assignee | ||
Comment 9•1 year ago
•
|
||
I got a good handle on these pieces today, and the news does not appear to be great when it comes to the Windows 10 Set Defaults UI.
(In reply to bhearsum@mozilla.com (:bhearsum) from comment #8)
- Firefox doesn't show up in the Windows 10 "Default Apps" (but it does show up if you drill down to "apps by file type", "apps by protocol", or "defaults by app")
I was able to get both entries to show up in the main "Default Apps" list by adjusting the private mode HKLM\Software\Classes$ProgID\shell\open\command key. By changing that to a unique binary (in this case, I copied firefox.exe to firefox-private.exe and changed the registry), both were shown.
I tried other things to get it show up as well -- such as adjusting other parts of the registry to be distinct (various strings and paths in RegisteredApplications
and StartMenuInternet
subkeys) -- but none of them had any effect.
- Private and non-private mode are showing the same strings and icons in most places on Windows 10, and in a couple of places on Windows 7.
This is still an issue though, at least on Windows 10. As best I can tell, both the name and the icon are picked up automatically by looking at the metadata of the file in the aforementioned command. I was able to manipulate the name by using Resource Hacker to adjust it -- but this breaks signatures, so the only way we'd be able to achieve this in proper builds is shipping a second binary with these parts tweaked. I haven't tested adjusting the icon, but it's probably possible (I haven't seen it caching the icon it uses anywhere, so I suspect it just uses the first icon every time).
It's worth noting that none of this stops Firefox (private browsing or otherwise) from becoming the default browser -- it just breaks or makes worse certain parts of the Windows UI for doing so.
Comment 10•1 year ago
|
||
(In reply to bhearsum@mozilla.com (:bhearsum) from comment #8)
There's a few things we can test here before we do any in-product work. Specifically that:
- Private and non-private mode can be set set as the default browser
- On Win10&Win11 Private Mode can be set as default through the Windows Settings change by protocol, but on about:preferences the default status is not changed (it shows "Nightly is not your default browser")
- On Win7 Private Mode can be set as default through Windows Default Programs. If selecting from about:preferences "Make default", the default Normal browsing is set and it shows "Nightly is your default browser".
- Private and non-private mode are both available as File & Protocol handlers (all versions)
- On Win10&Win11 users can open links, mailto in default Private mode.
- On Win7 users can open links, mailto, html, avif files in default Private mode.
- Private Browsing is available as an option in the "Open With..." context menu for html and other file types
- "Open With .." from the context menu has only one FireFox Nightly option and is the normal Browser, not the Private one, on all Win platforms.
There's a few rough edges here at the moment that I'm still trying to work through -- but most of this works. The things I'm still working through are:
- Firefox doesn't show up in the Windows 10 "Default Apps" (but it does show up if you drill down to "apps by file type", "apps by protocol", or "defaults by app")
- Choose default "apps by file type" shows only one Firefox icon and is the normal one, while "apps by protocol" / "defaults by app" have two instances of Firefox.
This is what we managed to verify so far. Could you please take a look at the inline comments and let us know your input? Thank you.
Assignee | ||
Comment 11•1 year ago
|
||
Thank you for the testing so far! This matches what I would expect in most cases. There's just one thing I'd like to clarify below:
(In reply to Monica Chiorean from comment #10)
(In reply to bhearsum@mozilla.com (:bhearsum) from comment #8)
There's a few things we can test here before we do any in-product work. Specifically that:
- Private and non-private mode can be set set as the default browser
- On Win10&Win11 Private Mode can be set as default through the Windows Settings change by protocol, but on about:preferences the default status is not changed (it shows "Nightly is not your default browser")
Does the Default Browser status in about:preferences change when you use the "Make Default" button there to set regular Firefox to the default browser? (Like you said it does below for Windows 7.)
- Private Browsing is available as an option in the "Open With..." context menu for html and other file types
- "Open With .." from the context menu has only one FireFox Nightly option and is the normal Browser, not the Private one, on all Win platforms.
I noticed this as well. We may be dropping this requirement, so I'll come back to it after we know what's going on there.
Comment 12•1 year ago
|
||
(In reply to bhearsum@mozilla.com (:bhearsum) from comment #11)
Thank you for the testing so far! This matches what I would expect in most cases. There's just one thing I'd like to clarify below:
(In reply to Monica Chiorean from comment #10)
(In reply to bhearsum@mozilla.com (:bhearsum) from comment #8)
There's a few things we can test here before we do any in-product work. Specifically that:
- Private and non-private mode can be set set as the default browser
- On Win10&Win11 Private Mode can be set as default through the Windows Settings change by protocol, but on about:preferences the default status is not changed (it shows "Nightly is not your default browser")
Does the Default Browser status in about:preferences change when you use the "Make Default" button there to set regular Firefox to the default browser? (Like you said it does below for Windows 7.)
- On Win10&Win11 when on about:preferences and pressing ‘Make Default’ button the Windows default settings page is opened. If selecting http, https and html from “Set defaults by app” then FF is set as default in about:preferences (but is FF Normal for html files and FF Private for http and https).
- On Win7 when on about:preferences and pressing ‘Make Default’ button the default is set for Normal FF. Normal FF can be changed to Private from Windows ->Default programs (files and links are opened with FF Private, depending on the settings made).
- Private Browsing is available as an option in the "Open With..." context menu for html and other file types
- "Open With .." from the context menu has only one FireFox Nightly option and is the normal Browser, not the Private one, on all Win platforms.
I noticed this as well. We may be dropping this requirement, so I'll come back to it after we know what's going on there. - Ok
Assignee | ||
Comment 13•1 year ago
|
||
(In reply to Monica Chiorean from comment #12)
- On Win10&Win11 when on about:preferences and pressing ‘Make Default’ button the Windows default settings page is opened. If selecting http, https and html from “Set defaults by app” then FF is set as default in about:preferences (but is FF Normal for html files and FF Private for http and https).
Huh, this is very interesting! I will look into it. Thank you!
- On Win7 when on about:preferences and pressing ‘Make Default’ button the default is set for Normal FF. Normal FF can be changed to Private from Windows ->Default programs (files and links are opened with FF Private, depending on the settings made).
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 14•1 year ago
|
||
There was significant scope change to this project. Most notably for this bug, we are no longer going to offer Private Browsing as the default browser. This means that most of the existing stack can go. We will still be supporting Private Browsing taskbar pins which means at the very least, we need support for updating the icons and strings of those shortcuts, and removing them during uninstall.
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 15•1 year ago
|
||
Given the new scope for this project, there's a few things to test here:
- Shortcut names & icons should be updated (when they change) during updates. I'll have to hack something up with a custom MAR to test this, most likely.
- Shortcuts, taskbar pins, and jumplist entries should be removed during uninstall
We're no longer doing anything in the installer, so there's nothing to test or verify as part of the install process.
Assignee | ||
Comment 16•1 year ago
|
||
Depends on D139183
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 17•1 year ago
|
||
Pushed by bhearsum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93e272387c6a Uninstaller support for Private Browsing enhancements. r=nalexander,mhowell
Comment 18•1 year ago
|
||
bugherder |
Description
•