Closed Bug 1225648 Opened 9 years ago Closed 9 years ago

Remove duplicate skipDefaultBrowser code and fix double-counting error when tracking prompt counts

Categories

(Firefox :: Shell Integration, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 45
Tracking Status
firefox43 --- wontfix
firefox44 --- affected
firefox45 --- verified
firefox46 --- verified
firefox47 --- verified

People

(Reporter: jaws, Assigned: jaws)

References

Details

Attachments

(1 file)

We currently are duplicating the logic of the skip-default-browser-dialog code across the nsWindowsShellService, nsGnomeShellService, and nsMacShellService. Moving this logic to nsBrowserGlue will remove the duplication.

Also, we were previously incrementing browser.shell.defaultBrowserCheckCount pref in the shell services as well as within nsBrowserGlue, though the one in nsBrowserGlue was more conservative as it only incremented if recovery wasn't activated and if the browser wasn't already set as default.
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Attached patch PatchSplinter Review
Attachment #8688684 - Flags: review?(gijskruitbosch+bugs)
Flags: qe-verify+
Comment on attachment 8688684 [details] [diff] [review]
Patch

Review of attachment 8688684 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/nsBrowserGlue.js
@@ +1309,5 @@
>        }
>  
> +      let willPrompt = shouldCheck &&
> +                       !isDefault &&
> +                       !willRecoverSession;

Nit: I don't think you need to touch this line, right?

::: browser/components/shell/nsIShellService.idl
@@ -50,5 @@
> -   * Used to determine whether or not the "Set Default Browser" check
> -   * should be skipped during first-run or after the browser has been
> -   * run a few times.
> -   */
> -  readonly attribute boolean shouldSkipCheckDefaultBrowser;

This probably needs an idl rev.
Attachment #8688684 - Flags: review?(gijskruitbosch+bugs) → review+
Yeah I didn't need to touch that line. I made a change there while working on the patch then moved some code around again and didn't undo the change. Thanks for catching the IDL rev.
https://hg.mozilla.org/integration/fx-team/rev/082c30f30fb573f6d51c969c2f4efa439860068f
Bug 1225648 - Remove duplicate skipDefaultBrowser code and fix double-counting error when tracking prompt counts. r=Gijs
https://hg.mozilla.org/mozilla-central/rev/082c30f30fb5
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
I was able to reproduce this issue on Firefox 45.0a1 (2015-11-17) under Windows 10 64-bit.

Verified fixed on Firefox 45.0a1 (2015-12-09), Firefox 46.0a2 (2016-02-22) and Firefox 47.0a1 (2016-02-22) under Windows 10 64-bit, Ubuntu 12.04 32-bit and Mac OS X 10.9.5. The default browser dialog successfully appears for 3 consecutive browser runs, except the first one.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: