Report whether Firefox is the default `mailto` protocol handler
Categories
(Firefox :: Installer, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: nalexander, Assigned: mpohle)
References
Details
(Whiteboard: [fidedi-pdf])
Attachments
(1 file)
In Bug 1743914, we made it easy to collect whether Firefox is the default PDF handler. This ticket tracks doing the same for the mailto
protocol.
While here, perhaps we can also include whether Firefox itself has a registered mailto
protocol handler, so that launching Firefox to handle mailto
actually does something helpful.
If we can include a single extra bit, it would be helpful to also include if the default handler is a non-Firefox known-browser, i.e., Edge, Chrome, Brave, etc.
Updated•1 year ago
|
Reporter | ||
Comment 1•1 year ago
|
||
While here, perhaps we can also include whether Firefox itself has a registered
mailto
protocol handler, so that launching Firefox to handlemailto
actually does something helpful.
gijs: is this already instrumented? I see nothing immediate in probes.telemetry.mozilla.org but this is absolutely not my domain.
Comment 2•1 year ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #1)
While here, perhaps we can also include whether Firefox itself has a registered
mailto
protocol handler, so that launching Firefox to handlemailto
actually does something helpful.gijs: is this already instrumented? I see nothing immediate in probes.telemetry.mozilla.org but this is absolutely not my domain.
I don't believe so. There's no generic telemetry about what apps are used for what filetypes / protocols because doing so in a way that is privacy-preserving would take work (executable paths and handler URLs can contain PII, and I suppose potentially even file extensions or protocols could be used in identifying ways in some circumstances). It should be fine to do it specifically for mailto and for whether it is set to a specific handler or not, but I don't think we have that today, from looking at e.g. https://searchfox.org/mozilla-central/source/uriloader/exthandler/ExtHandlerService.sys.mjs which would be the natural place to add some of that telemetry.
Reporter | ||
Comment 3•1 year ago
|
||
(In reply to :Gijs (he/him) from comment #2)
(In reply to Nick Alexander :nalexander [he/him] from comment #1)
While here, perhaps we can also include whether Firefox itself has a registered
mailto
protocol handler, so that launching Firefox to handlemailto
actually does something helpful.gijs: is this already instrumented? I see nothing immediate in probes.telemetry.mozilla.org but this is absolutely not my domain.
I don't believe so. There's no generic telemetry about what apps are used for what filetypes / protocols because doing so in a way that is privacy-preserving would take work (executable paths and handler URLs can contain PII, and I suppose potentially even file extensions or protocols could be used in identifying ways in some circumstances). It should be fine to do it specifically for mailto and for whether it is set to a specific handler or not, but I don't think we have that today, from looking at e.g. https://searchfox.org/mozilla-central/source/uriloader/exthandler/ExtHandlerService.sys.mjs which would be the natural place to add some of that telemetry.
I understand that the details are sensitive, but the existence of a registered handler is not. Sounds like we don't collect that; this ticket will track doing so.
Updated•1 year ago
|
Reporter | ||
Comment 4•1 year ago
|
||
I think what we want to know is determined here: https://searchfox.org/mozilla-central/rev/55d8d8e0e00ab140088122be39f05e4cd867616a/browser/base/content/nsContextMenu.js#330-338. I'd lift that into nsIHandlerInfo
and include it in telemetry around https://searchfox.org/mozilla-central/rev/132ffbfd6842e5ecd3813673c24da849d3c9acf8/browser/components/BrowserGlue.sys.mjs#2663.
It's not 100% clear to me how to answer my second question, about whether the default handler is a non-Firefox browser. It appears that mailto:
is a protocol like any other (i.e., https
) and is protected by UserChoice
, so maybe our existing .pdf
telemetry collection, just works out of the box? That would be pleasant.
Comment 5•1 year ago
|
||
(In reply to Nick Alexander :nalexander [he/him] (PTO until Montreallhands August 21, 2023) from comment #4)
I think what we want to know is determined here: https://searchfox.org/mozilla-central/rev/55d8d8e0e00ab140088122be39f05e4cd867616a/browser/base/content/nsContextMenu.js#330-338. I'd lift that into
nsIHandlerInfo
and include it in telemetry around https://searchfox.org/mozilla-central/rev/132ffbfd6842e5ecd3813673c24da849d3c9acf8/browser/components/BrowserGlue.sys.mjs#2663.
So to be clear, that checks whether Firefox itself would handle mailto links it encounters on webpages using a web app (like gmail or similar).
It's orthogonal to whether the OS thinks that Firefox is the default handler for mailto apps outside of Firefox. You would need different code for that. Specifically, you can use something like this:
It should also be possible to call this from JS. The implementation already has the full path (but doesn't expose this), and you could probably use that to identify Chrome/Edge as needed.
It's not 100% clear to me how to answer my second question, about whether the default handler is a non-Firefox browser. It appears that
mailto:
is a protocol like any other (i.e.,https
) and is protected byUserChoice
, so maybe our existing
Last I checked the way Windows deals with protocols vs. files was subtly different, so I'm not sure this would be the same, but see my previous response.
Reporter | ||
Comment 6•1 year ago
|
||
(In reply to :Gijs (away until Sept 18th; he/him) from comment #5)
(In reply to Nick Alexander :nalexander [he/him] (PTO until Montreallhands August 21, 2023) from comment #4)
I think what we want to know is determined here: https://searchfox.org/mozilla-central/rev/55d8d8e0e00ab140088122be39f05e4cd867616a/browser/base/content/nsContextMenu.js#330-338. I'd lift that into
nsIHandlerInfo
and include it in telemetry around https://searchfox.org/mozilla-central/rev/132ffbfd6842e5ecd3813673c24da849d3c9acf8/browser/components/BrowserGlue.sys.mjs#2663.So to be clear, that checks whether Firefox itself would handle mailto links it encounters on webpages using a web app (like gmail or similar).
It's orthogonal to whether the OS thinks that Firefox is the default handler for mailto apps outside of Firefox. You would need different code for that. Specifically, you can use something like this:
It should also be possible to call this from JS. The implementation already has the full path (but doesn't expose this), and you could probably use that to identify Chrome/Edge as needed.
Yes, I'm aware of the difference, but I wasn't clear about this distinction. I'm not particularly fussed about mailto
defaults right now because it is almost certainly rare that Firefox is the default handler. I am concerned about what making Firefox the mailto
default will actually do, i.e., is it worth trying to be the mailto
default. Between our two approaches I think we can answer that latter question.
gijs: would you recommend one over the other? Or should I collect both?
It's not 100% clear to me how to answer my second question, about whether the default handler is a non-Firefox browser. It appears that
mailto:
is a protocol like any other (i.e.,https
) and is protected byUserChoice
, so maybe our existingLast I checked the way Windows deals with protocols vs. files was subtly different, so I'm not sure this would be the same, but see my previous response.
These are subtly different, yes, but we should handle both cases "out of the box".
Comment 7•1 year ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #6)
(In reply to :Gijs (away until Sept 18th; he/him) from comment #5)
(In reply to Nick Alexander :nalexander [he/him] (PTO until Montreallhands August 21, 2023) from comment #4)
I think what we want to know is determined here: https://searchfox.org/mozilla-central/rev/55d8d8e0e00ab140088122be39f05e4cd867616a/browser/base/content/nsContextMenu.js#330-338. I'd lift that into
nsIHandlerInfo
and include it in telemetry around https://searchfox.org/mozilla-central/rev/132ffbfd6842e5ecd3813673c24da849d3c9acf8/browser/components/BrowserGlue.sys.mjs#2663.So to be clear, that checks whether Firefox itself would handle mailto links it encounters on webpages using a web app (like gmail or similar).
It's orthogonal to whether the OS thinks that Firefox is the default handler for mailto apps outside of Firefox. You would need different code for that. Specifically, you can use something like this:
It should also be possible to call this from JS. The implementation already has the full path (but doesn't expose this), and you could probably use that to identify Chrome/Edge as needed.
Yes, I'm aware of the difference, but I wasn't clear about this distinction. I'm not particularly fussed about
mailto
defaults right now because it is almost certainly rare that Firefox is the default handler.
Is it? I thought we made it the default on install these days, per bug 675428. Maybe I misunderstood what that bug did and it just made it an option but didn't change the default?
I am concerned about what making Firefox the
mailto
default will actually do, i.e., is it worth trying to be themailto
default. Between our two approaches I think we can answer that latter question.
Is it worth doing that or should we "just" change the default action for mailto proactively? That's what was proposed in bug 1680250. That would certainly be easier. Adding a migration for existing users so we swap from "use the OS default" to "use always ask" if the OS default is Windows Mail or Mail.app would be a little more work, but not much.
gijs: would you recommend one over the other? Or should I collect both?
As may be obvious from my questions, I'm not sure I understand - or even if I'm being helpful (I hope so! But I'm worried I'm derailing your well-formed plans that I'm just not familiar with). But collecting either/both what app the user uses at the OS level (to see how many people have dedicated full-blown Outlook / Eudora / Lotus Notes / whatever installed and set as the OS default) and what their Firefox is configured to (how many people have figured out how to always use a web app vs still have it set to "use OS default") would be interesting to note, and would also allow us to confirm whether any changes we make have the desired effect. The combination would effectively give you "addressable market" for people who have it set to the OS default but (we assume) don't actually use that application (that's a big A assumption; it feels potentially evil to try to work out (and collect) if people do use that application.
This change only does what the title of the bug says and will not help
to understand which other programs are used.
Comment 10•4 months ago
|
||
bugherder |
Description
•