Closed Bug 1805511 Opened 2 years ago Closed 2 years ago

Add `ASRouterTargeting` about non-browser default handlers, including `isDefaultPDFHandler`

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
112 Branch
Iteration:
112.2 - Feb 27 - Mar 10
Tracking Status
firefox112 --- verified

People

(Reporter: nalexander, Assigned: beth)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fidedi-pdf])

Attachments

(1 file)

ASRouterTargeting knows if Firefox is the default browser, but not if Firefox is the default handler for other filetypes, such as isDefaultPDFHandler.

I don't know how general this should be; it would be nice if we exposed the entire list of recognized handlers, a la BrowserContentHandler.sys.mjs, but I see that we're not even recording telemetry for defaults beyond PDF (see BrowserGlue.sys.mjs).

This is probably Windows-only. In addition, we might want to include a special bit about whether the existing default handler is a recognized browser, since we want to treat other browsers differently than general purpose readers such as Acrobat Reader or Nitro PDF.

Component: Background Tasks → Messaging System
Product: Toolkit → Firefox
Whiteboard: [fidedi-notifications] → [fidedi-pdf]

This would most likely be used along with bug 1805509 as part of an upcoming experiment. If this is exposed more broadly as any handler instead of just pdf, we could have the targeting return an object keyed on those file extensions? E.g.,

isDefaultHandler: {
  html: true,
  pdf: true,
}

Then target on isDefaultHandler.pdf or probably negated for this experiment.

Assignee: nobody → brennie
Iteration: --- → 111.2 - Jan 30 - Feb 10
Priority: P3 → P1

(In reply to Ed Lee :Mardak from comment #1)

This would most likely be used along with bug 1805509 as part of an upcoming experiment. If this is exposed more broadly as any handler instead of just pdf, we could have the targeting return an object keyed on those file extensions? E.g.,

isDefaultHandler: {
  html: true,
  pdf: true,
}

Then target on isDefaultHandler.pdf or probably negated for this experiment.

:nalexander, what do you think about this? This format would break your implementation of getEnvironmentSnapshot() due to having promises nested inside an object. Should getEnvironmentSnapshot be updated to recursively resolve -- or walk a single level deep if the object it would resolve is not a promise?

Flags: needinfo?(nalexander)

(In reply to Barret Rennie [:barret] (they/them) from comment #2)

(In reply to Ed Lee :Mardak from comment #1)

This would most likely be used along with bug 1805509 as part of an upcoming experiment. If this is exposed more broadly as any handler instead of just pdf, we could have the targeting return an object keyed on those file extensions? E.g.,

isDefaultHandler: {
  html: true,
  pdf: true,
}

Then target on isDefaultHandler.pdf or probably negated for this experiment.

:nalexander, what do you think about this?

This looks good to me. Please don't forget about the extra bit of "default PDF handler is a known-browser", the experiment wants that.

This format would break your implementation of getEnvironmentSnapshot() due to having promises nested inside an object. Should getEnvironmentSnapshot be updated to recursively resolve -- or walk a single level deep if the object it would resolve is not a promise?

I see no immediate problem with either. Recursively resolving probably makes the most sense?

Flags: needinfo?(nalexander)
Blocks: 1815304
Iteration: 111.2 - Jan 30 - Feb 10 → 112.1 - Feb 13 - Feb 24
Iteration: 112.1 - Feb 13 - Feb 24 → 112.2 - Feb 27 - Mar 10
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae16a9890f22 Add targeting for default PDF and HTML handlers r=nalexander,omc-reviewers,emcminn
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e5bd4ad558f2 Add targeting for default PDF and HTML handlers r=nalexander,omc-reviewers,emcminn
Flags: needinfo?(brennie)
Blocks: 1686284
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cc29190ca789 Add targeting for default PDF and HTML handlers r=nalexander,omc-reviewers,emcminn
Regressions: 1820642
No longer regressions: 1820642
Flags: needinfo?(brennie)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Regressions: 1821644

This enhancement was part of the work done on the QA-1801 request. Considering this I am marking it as Verified.

Status: RESOLVED → VERIFIED
Regressions: 1827718
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: