Add a Telemetry probe to track how often Firefox is used as the default handler

RESOLVED FIXED in Firefox 48

Status

()

P5
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jaws, Assigned: jaws)

Tracking

(Blocks: 1 bug)

Trunk
Firefox 50
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed, firefox49 fixed, firefox50 fixed)

Details

Attachments

(1 attachment)

Right now the only real benefit of setting Firefox as the default browser is having Firefox opened as the default handler for website links from external applications and HTML files.

We should track how often Firefox is used in this manner. If the usage is very low, we should consider removing prompts for setting Firefox as the default browser.
Created attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

Review commit: https://reviewboard.mozilla.org/r/55910/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/55910/
Attachment #8757483 - Flags: review?(dolske)
Attachment #8757483 - Flags: review?(benjamin)
Assignee: nobody → jaws
Status: NEW → ASSIGNED

Updated

2 years ago
Attachment #8757483 - Flags: review?(benjamin)

Comment 2

2 years ago
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

https://reviewboard.mozilla.org/r/55910/#review53680

::: toolkit/components/telemetry/Histograms.json:4424
(Diff revision 1)
> +  "FX_STARTUP_EXTERNAL_CONTENT_HANDLER": {
> +    "bug_numbers": [1276027],
> +    "alert_emails": ["jaws@mozilla.com"],
> +    "expires_in_version": "53",
> +    "kind": "count",
> +    "description": "Count how often the browser is started via an external app handler. This is generally used when the browser is set as the default browser."

Have you tested that this works on Mac and Windows? I know that the codepath is very different on Mac because of AppleEvents, although I think it may end up triggering this. You should make sure.

You should clarify the description here. Technically this doesn't show you how many times the browser was *started* via external links. It shows you how many times external links were opened.

data-review=me with that fixed
Priority: -- → P5
I got confirmation from bwinton over IRC that this code path in nsBrowserContentHandler.js is hit on Mac. I will update the histogram description when I land this.
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55910/diff/1-2/
Attachment #8757483 - Attachment description: MozReview Request: Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler. r?dolske,bsmedberg → Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.
Attachment #8757483 - Flags: review?(robert.strong.bugs)
Attachment #8757483 - Flags: review?(dolske)
Attachment #8757483 - Flags: review?(benjamin)
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

Carrying forward bsmedberg's r+.
Attachment #8757483 - Flags: review?(benjamin) → review+
https://reviewboard.mozilla.org/r/55910/#review54458

::: browser/components/nsBrowserContentHandler.js:716
(Diff revision 2)
>    /* nsICommandLineHandler */
>    handle : function dch_handle(cmdLine) {
> +    // Only track the external content handler usage if Firefox is also
> +    // set as the default browser, to prevent against counting command-line
> +    // users in our results.
> +    if (ShellService.isDefaultBrowser(false, false)) {

I think you will still need to verify that you are getting a command line from the OS (e.g. -osint on Windows and I *think* -url on other platforms though it would likely be OK to just check for -url on all platforms) unless you've verified that this code isn't called when launching a shortcut, via start -> run -> firefox.exe, etc.
and even if you've verified the command line handler isn't called it depends on if you think it is unlikely that people launch firefox with command lines that often which I believe would include -P, -no-remote, etc. causing this code to count Firefox as the default handler.
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

https://reviewboard.mozilla.org/r/55910/#review54592
Attachment #8757483 - Flags: review?(robert.strong.bugs) → review-
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55910/diff/2-3/
Attachment #8757483 - Flags: review?(robert.strong.bugs)
Attachment #8757483 - Flags: review?(benjamin)
Attachment #8757483 - Flags: review-
Attachment #8757483 - Flags: review+
Attachment #8757483 - Flags: review?(robert.strong.bugs) → review+
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

https://reviewboard.mozilla.org/r/55910/#review54928

::: browser/components/nsBrowserContentHandler.js:715
(Diff revision 3)
>  
>    /* nsICommandLineHandler */
>    handle : function dch_handle(cmdLine) {
> +    // The -url flag is inserted by the operating system when the default
> +    // application handler is used. We check for default browser to remove
> +    // instances where users explicitly decide to "open with" the browser.

Please include in the comment that this will also record launches when the user passes -url in the command line.
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

Carrying forward bsmedberg's r+
Attachment #8757483 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/integration/fx-team/rev/95f7a3e334349b65ef491360cea17070f4d97c66
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler. r=bsmedberg,rstrong

Comment 14

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/95f7a3e33434
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

Approval Request Comment
[Feature/regressing bug #]: n/a
[User impact if declined]: delayed results in telemetry based on how often firefox is opened from other applications
[Describe test coverage new/current, TreeHerder]: only adds a telemetry probe
[Risks and why]: none expected
[String/UUID change made/needed]: none
Attachment #8757483 - Flags: approval-mozilla-beta?
Attachment #8757483 - Flags: approval-mozilla-aurora?
status-firefox48: --- → affected
Comment on attachment 8757483 [details]
Bug 1276027 - Add a Telemetry probe to track how often Firefox is used as the default handler.

Anything to help making better decisions, taking it.
Should be in 48 beta 2
Attachment #8757483 - Flags: approval-mozilla-beta?
Attachment #8757483 - Flags: approval-mozilla-beta+
Attachment #8757483 - Flags: approval-mozilla-aurora?
Attachment #8757483 - Flags: approval-mozilla-aurora+

Updated

2 years ago
Depends on: 1287288
You need to log in before you can comment on or make changes to this bug.