Commit graph

641 commits

Author SHA1 Message Date
Gijs Kruitbosch
8e67201171 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
Norisz Fay
acdd6851cd Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch
27039e2946 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Nick Alexander
5e7cb798df Bug 1762100 - Part 3: Expect and use FirefoxPDF-.... r=bhearsum
This does two things.  First, it expects the special
FirefoxPDF-... ProgID to be available for UserChoice.  We could manage
without it for a while, but eventually we expect set-to-default to
include PDFs.  When that is the case, if it doesn't exist, something
has gone very wrong, and we'd like to find that out (via our existing
telemetry, which reports "missing" ProgIDs).

Second, it arranges to use the new FirefoxPDF-... ProgID when
setting-to-default.

Differential Revision: https://phabricator.services.mozilla.com/D142303
2022-03-30 03:42:00 +00:00
Nick Alexander
823f7095f3 Bug 1762100 - Part 1: Accommodate arbitrary ProgID roots in set-default-browser-user-choice. r=bhearsum
This anticipates separating the FirefoxPDF-... handler from the
FirefoxHTML-... handler.

Differential Revision: https://phabricator.services.mozilla.com/D142301
2022-03-30 03:41:59 +00:00
Nick Alexander
27f0477631 Bug 1761504 - Add setDefaultPDFHandlerOnlyReplaceBrowsers Nimbus feature. r=bhearsum
When enabled, this feature restricts the existing
`setDefaultPDFHandler` Nimbus feature to only set Firefox as the
default PDF handler when the existing handler is a known browser.

Depends on D142147

Differential Revision: https://phabricator.services.mozilla.com/D142148
2022-03-29 03:57:00 +00:00
Nick Alexander
e55ce25a0a Bug 1746527 - Make browser/components/shell/test/browser_setDefaultPDFHandler.js Windows 10+. r=bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D142147
2022-03-27 04:01:59 +00:00
Emilio Cobos Álvarez
9ddc42292b Bug 1760839 - Use more automatic memory management in GTK code. r=stransky
This fixes a couple potential leaks (e.g., see the UPowerClient changes,
we weren't freeing all the devices properly).

Differential Revision: https://phabricator.services.mozilla.com/D141775
2022-03-23 16:14:34 +00:00
Ben Hearsum
654d60a687 Bug 1751038: Add Telemetry to identify sessions started through Private Browsing shortcuts r=nalexander
Two new things here:
1) We append "Private" to the existing shortcut classification if it is likely to be a Private Browsing shortcut. (To help maintain the goal of avoiding I/O this is done by looking at the filename rather than inspecting the shortcut args.)
2) A totally new `is_taskbar_pinned_private` to report whether or not a Private Browsing shortcut is pinned to the Taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D140653
2022-03-17 16:33:35 +00:00
Ben Hearsum
0f0cc651ae Bug 1750991: Add support for pinning to taskbar in Windows 7 & 8 through WindowsShellService. r=mhowell
I ended up refactoring the Windows version specific parts into their own functions, which I think makes this a bit nicer to read.

Differential Revision: https://phabricator.services.mozilla.com/D139183
2022-03-17 16:33:34 +00:00
Ben Hearsum
ad43698e49 Bug 1750991: Automatically create shortcut if it's not already present when pinning to the Windows Taskbar. r=mhowell
There's some general improvements to CreateShortcut here: writing them out to a log, setting the working directory, allowing the icon to be customized. To support the shortcuts log, I had to restrict how shortcut locations are specified to be a KNOWNFOLDERID -- I couldn't think of any other way to make sure we accurately record them. Notably, this code has been unused since the Site Specific Browsing work was backed out - so there's no existing callers to worry about breaking.

This patch also enhances the pin to taskbar code to automatically create a shortcut if none exist (this is how we'll want things to work for the Private Browsing shortcuts, and it seemed like a generally useful thing to do).

Differential Revision: https://phabricator.services.mozilla.com/D138197
2022-03-17 16:33:34 +00:00
Ben Hearsum
4a06eb3f49 Bug 1750991: Add support for pinning a a Private Browsing mode shortcut to the Taskbar. r=mhowell
The bulk of this is wiring in a Private Browsing flag in the places that need it, and using some of the recently added WinTaskbar code to grab the correct AUMID. Beyond that, the notable parts are:
* The interface difference between isCurrentAppPinnedToTaskbarAsync and the other changed methods. I was hoping to use the Private Browsing flag everywhere, but doing so in code that run in a separate thread ended up crashing due to the Preferences usage in WinTaskbar (https://searchfox.org/mozilla-central/rev/9d66919569655a8fae9b431550241c058fa85b8a/widget/windows/WinTaskbar.cpp#216)
* The new string for the Private Browsing shortcut. The exact string may change, so it's hardcoded for now.
* Checking the AUMID of shortcuts when looking for a match (to make sure Private Browsing doesn't pick up non-private, and visa versa)
* Some fixes for tests of ShellService.jsm -- I honestly have no idea how these ever passed on Linux.

Differential Revision: https://phabricator.services.mozilla.com/D138196
2022-03-17 16:33:34 +00:00
Ben Hearsum
5da50d1a7c Bug 1750991: Add helper for writing to a new shortcuts log in ProgramData. r=mhowell
These new shortcut logs are named with App name + User SID, which should almost certainly be writeable (unless someone manually created one with a different account for some reason).

Differential Revision: https://phabricator.services.mozilla.com/D138195
2022-03-17 16:33:33 +00:00
Emilio Cobos Álvarez
74c4e590a6 Bug 1757209 - Don't hardcode snap instance name. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D139761
2022-02-28 15:07:16 +00:00
Emilio Cobos Álvarez
8e7fb6594f Bug 1756083 - Remove useless ifdef. r=stransky
We never compile nsGNOMEShellService without MOZ_WIDGET_GTK.

Depends on D139474

Differential Revision: https://phabricator.services.mozilla.com/D139475
2022-02-23 13:59:33 +00:00
Emilio Cobos Álvarez
0422925d7e Bug 1756083 - Cleanup snap name handling and enable portal when running under either flatpak or snap. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D139474
2022-02-23 13:59:33 +00:00
Noemi Erli
cfc7069bc4 Backed out changeset e6e6714aa40a (bug 1516290) for causing valgrind failures 2022-01-23 18:20:28 +02:00
Emilio Cobos Álvarez
2dfce95b86 Bug 1516290 - Check for default browser using xdg-settings before trying to use the protocol handler. r=stransky
This seems worth doing regardless of whether we do D136076.

Differential Revision: https://phabricator.services.mozilla.com/D136623
2022-01-23 13:41:12 +00:00
Mark Banner
4f4dd2fbae Bug 1750974 - Extend our ESLint import-globals-from function to support absolute directories. r=Gijs,mossop
Differential Revision: https://phabricator.services.mozilla.com/D136368
2022-01-20 14:15:34 +00:00
Toshihito Kikuchi
916fbe8459 Bug 1743427 - Enable pre-spawn CIG for socket process. r=bobowen
Since socket process can be launched before `GeckoDependentInitialize`,
we cache the install directory in `InitSignedPolicyRulesToBypassCig`
instead of using `sBinDir`.

This patch moves `GetInstallDirectory` to WinHeaderOnlyUtils.h to reuse
and removes `WinUtils::GetModuleFullPath` that is unused.

Differential Revision: https://phabricator.services.mozilla.com/D133596
2021-12-27 02:40:14 +00:00
Mike Hommey
fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Cristian Tuns
e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Mike Hommey
b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00
Toshihito Kikuchi
5bb452d7f6 Bug 1743783 - Ignore extra command options when taking a screenshot. r=mossop
`HeadlessShell.handleCmdLineArgs` needs to skip arguments starting with a hyphen
to search for a URL.

This patch also fixes a problem that `nsNativeAppSupportWin::CheckConsole` did
not remove processed command options.

Differential Revision: https://phabricator.services.mozilla.com/D132987
2021-12-16 16:16:16 +00:00
Barret Rennie
9e1cd98548 Bug 1745355 - Remove osfile.jsm from browser/components/shell r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D133514
2021-12-14 21:00:28 +00:00
Nick Alexander
93c6fe08a4 Bug 1743914 - Part 3: Telemetry for when Firefox is the default handler. r=chutten,mhowell
This only records whether Firefox is the default PDF handler for now.
But it will accommodate additional file types and protocols in the
future, should they be desired.

This is Windows 10+ only, since we really only care about PDF handling
defaults where Edgium is the OS default.

Differential Revision: https://phabricator.services.mozilla.com/D132659
2021-12-12 03:52:57 +00:00
Nick Alexander
91010d4d41 Bug 1743914 - Part 2: Allow to experiment with setting Firefox as default PDF handler on Windows 10+. r=mhowell,Mardak
This adds a `setDefaultPDFHandler` that extends the existing
`setDefaultBrowserUserChoice` to also set Firefox as the default PDF
handler when setting Firefox as the default browser.  (Since this uses
User Choice, it's Windows 10+ only.)

Differential Revision: https://phabricator.services.mozilla.com/D132660
2021-12-12 03:52:56 +00:00
Butkovits Atila
5c71755e40 Backed out 3 changesets (bug 1743914) for causing failures at browser_setDefaultPDFHandler.js. CLOSED TREE
Backed out changeset 01e19b8ec15b (bug 1743914)
Backed out changeset c46d66869d03 (bug 1743914)
Backed out changeset 57d0f8824e35 (bug 1743914)
2021-12-11 10:48:19 +02:00
Nick Alexander
7ed0417539 Bug 1743914 - Part 3: Telemetry for when Firefox is the default handler. r=chutten,mhowell
This only records whether Firefox is the default PDF handler for now.
But it will accommodate additional file types and protocols in the
future, should they be desired.

This is Windows 10+ only, since we really only care about PDF handling
defaults where Edgium is the OS default.

Differential Revision: https://phabricator.services.mozilla.com/D132659
2021-12-11 06:25:57 +00:00
Nick Alexander
2b59a70e77 Bug 1743914 - Part 2: Allow to experiment with setting Firefox as default PDF handler on Windows 10+. r=mhowell,Mardak
This adds a `setDefaultPDFHandler` that extends the existing
`setDefaultBrowserUserChoice` to also set Firefox as the default PDF
handler when setting Firefox as the default browser.  (Since this uses
User Choice, it's Windows 10+ only.)

Differential Revision: https://phabricator.services.mozilla.com/D132660
2021-12-11 06:25:57 +00:00
Narcis Beleuzu
66356e92dc Backed out 3 changesets (bug 1743914) for bc failures on browser_setDefaultPDFHandler.js
Backed out changeset 088401e43bd4 (bug 1743914)
Backed out changeset 7cb74ac80d41 (bug 1743914)
Backed out changeset 20713ede0c08 (bug 1743914)
2021-12-11 03:28:02 +02:00
Nick Alexander
5f31cda44e Bug 1743914 - Part 3: Telemetry for when Firefox is the default handler. r=chutten,mhowell
This only records whether Firefox is the default PDF handler for now.
But it will accommodate additional file types and protocols in the
future, should they be desired.

This is Windows 10+ only, since we really only care about PDF handling
defaults where Edgium is the OS default.

Differential Revision: https://phabricator.services.mozilla.com/D132659
2021-12-11 00:02:40 +00:00
Nick Alexander
530bcdf73a Bug 1743914 - Part 2: Allow to experiment with setting Firefox as default PDF handler on Windows 10+. r=mhowell,Mardak
This adds a `setDefaultPDFHandler` that extends the existing
`setDefaultBrowserUserChoice` to also set Firefox as the default PDF
handler when setting Firefox as the default browser.  (Since this uses
User Choice, it's Windows 10+ only.)

Differential Revision: https://phabricator.services.mozilla.com/D132660
2021-12-11 00:02:39 +00:00
Andrei Oprea
ef300c52d4 Bug 1738286 - New schema and enrollment flow for rollouts r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D129835
2021-12-09 17:58:18 +00:00
Niklas Baumgardner
49c7deeea0 Bug 1731687 - Remove browser-doctype.inc. r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D127136
2021-09-30 20:01:03 +00:00
Geoff Brown
019c21f335 Bug 1730213 - Explicitly skip tests under browser/ on android; r=ahal
These tests are excluded from android test runs in moz.build. Including
an explicit annotation in each manifest avoids scheduling confusion.
browser-chrome and plain-chrome tests in browser/ are of no concern,
since those test types are never scheduled on android.

Differential Revision: https://phabricator.services.mozilla.com/D125266
2021-09-13 15:22:27 +00:00
Mark Banner
11bfa90d06 Bug 1602940 - Automated replacements to use Services.uuid. r=Gijs,necko-reviewers,preferences-reviewers,kershaw
Depends on D124391

Differential Revision: https://phabricator.services.mozilla.com/D124392
2021-09-06 09:53:52 +00:00
Adam Gashlin
7fa6c2befd Bug 1722086 - Part 2: Centralize check for minimum Windows build. r=bytesized
This allows the check from bug 1719189 to be used by the WDBA without
duplication, and keeps it close to the rest of the UserChoice logic.

Differential Revision: https://phabricator.services.mozilla.com/D121559
2021-08-03 22:49:20 +00:00
Andrei Oprea
a66714326b Bug 1716736 - Add schema validation for experiment enrollments in tests r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D118367
2021-07-26 14:48:22 +00:00
Dorel Luca
5a8b32e3c6 Backed out changeset e7dffca31fa7 (bug 1716736) for Browser-chrome failures in browser/components/shell/test/browser_setDefaultBrowser.js. CLOSED TREE 2021-07-26 14:08:51 +03:00
Andrei Oprea
9ae9067efe Bug 1716736 - Add schema validation for experiment enrollments in tests r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D118367
2021-07-26 09:43:28 +00:00
Sandor Molnar
1fb5cc9576 Backed out changeset e5cfc59f9063 (bug 1716736) for causing bc failures in browser_setDefaultBrowser. CLOSED TREE 2021-07-26 01:17:51 +03:00
Andrei Oprea
cb62f517d4 Bug 1716736 - Add schema validation for experiment enrollments in tests r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D118367
2021-07-25 21:01:16 +00:00
Adam Gashlin
7b21c41dfe Bug 1710137 - Don't run helper to set default from a package. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D114662
2021-07-13 20:31:25 +00:00
Adam Gashlin
593d81e560 Bug 1719189 - Only set UserChoice on build 15063 and later. r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D119343
2021-07-08 17:34:26 +00:00
Molly Howell
cade0ddd2c Bug 1709671 - Remove redundant ProgID check from IsDefaultBrowser. r=agashlin
Also switch to removing the quotes and command-line parameters from the command
string obtained from the registry before comparing it to our path, instead of
*adding* those things to our path, to make the comparison more reliable.

Differential Revision: https://phabricator.services.mozilla.com/D114383
2021-07-07 17:33:06 +00:00
Ed Lee
469e83e010 Bug 1694259 - Allow experimenting with 1-click default vs settings-dialog-ful flow r=andreio
Switch pref check to NimbusFeature.getVariable with updated manifest for fallback pref.

Differential Revision: https://phabricator.services.mozilla.com/D118760
2021-06-25 21:53:26 +00:00
Ed Lee
2b631a483e Bug 1716884 - Allow experimenting with disabling Keep in Dock / Pin to taskbar r=andreio
Add new NimbusFeature.shellService that is available at startup, e.g., for default browser prompt.

Differential Revision: https://phabricator.services.mozilla.com/D118092
2021-06-17 23:44:38 +00:00
Adam Gashlin
25b5f25e18 Bug 1703578 - Part 4: Record setAsDefaultUserChoice() result telemetry. r=bytesized
Depends on D113428

Differential Revision: https://phabricator.services.mozilla.com/D113429
2021-06-17 18:06:35 +00:00
Adam Gashlin
00133ca183 Bug 1703578 - Part 3: Invoke WDBA to set UserChoice. r=bytesized
Depends on D113427

Differential Revision: https://phabricator.services.mozilla.com/D113428
2021-06-17 18:06:35 +00:00