Commit Graph

147 Commits

Author SHA1 Message Date
Niklas Baumgardner
85f4ed5a3b Bug 1961393 - Show current theme on about:editprofile if not in default list. r=profiles-reviewers,tbersentes,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D247444
2025-05-14 18:31:18 +00:00
Dave Townsend
006f12bf16 Bug 1962855: Properly await async method calls. r=profiles-reviewers,niklas
Differential Revision: https://phabricator.services.mozilla.com/D246920
2025-04-28 15:37:53 +00:00
Dave Townsend
bc2d27c8b8 Bug 1954538: Use the remoting service to activate other instances when possible. r=profiles-reviewers,jhirsch
Also replaces some of our handwritten mocks with sinon usage.

Differential Revision: https://phabricator.services.mozilla.com/D245585
2025-04-28 14:11:57 +00:00
Dave Townsend
62368b7793 Bug 1953949: Use the remoting service to pass external links to the current default profile for the group. r=jhirsch,profiles-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245584
2025-04-28 14:11:57 +00:00
Dave Townsend
e648a053c2 Bug 1962531: Re-create the original profile or reset state if the profiles created pref is accidentally set. r=profiles-reviewers,jhirsch
Bug 1953884 made the storeID pref always set and used the presence of storeID in profiles.ini to
determine whether profiles had previously been created. However it missed the startup code in
nsToolkitProfileService which always sets the storeID in profiles.ini if there is one set in prefs.
This means that users who had never used the profiles feature had the profiles created pref set to
true but no entry for the current profile was added to the database. This causes bustage when we
attempt to display various parts of the UI.

This adds a check to a point in startup when we know we should have found an entry for the current
profile in the database. If one doesn't exist we either create one if there are other profiles in
the database or we reset the prefs and profiles.ini to what they should look like if no profiles
have ever been created.

This should also resolve bug 1943559.

Differential Revision: https://phabricator.services.mozilla.com/D246775
2025-04-25 17:36:07 +00:00
Niklas Baumgardner
7276800327 Bug 1953884 - Eagerly create the profiles shared database. r=profiles-reviewers,mossop,jhirsch,firefox-desktop-core-reviewers ,omc-reviewers,emcminn
Differential Revision: https://phabricator.services.mozilla.com/D244621
2025-04-23 15:20:14 +00:00
Goloman Adrian
d077851163 Backed out 2 changesets (bug 1953949, bug 1954538) for causing bc failures @browser_test_profile_selector.js.
Backed out changeset 298aa10942ea (bug 1954538)
Backed out changeset d08e2e97aa83 (bug 1953949)
2025-04-23 16:28:48 +03:00
Dave Townsend
bd4149640f Bug 1954538: Use the remoting service to activate other instances when possible. r=profiles-reviewers,jhirsch
Also replaces some of our handwritten mocks with sinon usage.

Differential Revision: https://phabricator.services.mozilla.com/D245585
2025-04-23 12:24:13 +00:00
Dave Townsend
acea3c6a66 Bug 1953949: Use the remoting service to pass external links to the current default profile for the group. r=jhirsch,profiles-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245584
2025-04-23 12:24:13 +00:00
smolnar
e903ba0421 Backed out 2 changesets (bug 1954538, bug 1953949) for causing xpc failures @ test_delete_last_profile.js CLOSED TREE
Backed out changeset 2b9644efd4e4 (bug 1954538)
Backed out changeset da9eb03eddca (bug 1953949)
2025-04-22 19:57:26 +03:00
Dave Townsend
22f2e51c0e Bug 1954538: Use the remoting service to activate other instances when possible. r=profiles-reviewers,jhirsch
Also replaces some of our handwritten mocks with sinon usage.

Differential Revision: https://phabricator.services.mozilla.com/D245585
2025-04-22 14:24:08 +00:00
Dave Townsend
b8070177f8 Bug 1953949: Use the remoting service to pass external links to the current default profile for the group. r=jhirsch,profiles-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245584
2025-04-22 14:24:08 +00:00
Jared Hirsch
1b0720c6d7 Bug 1957924 - Ensure profile group ID is applied to all profiles after re-enabling data collection. r=profiles-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D244260
2025-04-07 14:41:31 +00:00
Stanca Serban
2018c5fbd0 Backed out changeset 3ffd7e1d0343 (bug 1957924) for causing mochitests failures in browser_preferences.js. CLOSED TREE 2025-04-04 04:08:27 +03:00
Jared Hirsch
5fe4b738fb Bug 1957924 - Ensure profile group ID is applied to all profiles after re-enabling data collection. r=profiles-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D244260
2025-04-03 23:59:18 +00:00
Jared Hirsch
e33e0b5fd5 Bug 1956105 - Propagate data upload pref changes between profiles in a group. r=profiles-reviewers,settings-reviewers,mossop
Add a pref that we overlooked in the original patch (bug 1933264).

Differential Revision: https://phabricator.services.mozilla.com/D242863
2025-03-26 23:25:15 +00:00
Cosmin Sabou
c0283b2ae1 Backed out changeset 4f577328f67e (bug 1956105) for causing bc failures on browser_privacy_uploadEnabled. CLOSED TREE 2025-03-27 00:54:44 +02:00
Jared Hirsch
1f15c60a14 Bug 1956105 - Propagate data upload pref changes between profiles in a group. r=profiles-reviewers,settings-reviewers,mossop
Add a pref that we overlooked in the original patch (bug 1933264).

Differential Revision: https://phabricator.services.mozilla.com/D242863
2025-03-26 16:05:08 +00:00
Niklas Baumgardner
4650044b77 Bug 1955397 - Only get computed theme colors if default theme. r=profiles-reviewers,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D242569
2025-03-25 14:15:54 +00:00
Jared Hirsch
a78e75d919 Bug 1933264 - Copy data preferences between profiles in a group. r=profiles-reviewers,fluent-reviewers,settings-reviewers,mossop,bolsson
Also add an explanatory note to preferences.

Differential Revision: https://phabricator.services.mozilla.com/D241902
2025-03-20 17:17:57 +00:00
Niklas Baumgardner
13d3167b04 Bug 1950167, 1953316 - Use InspectorUtils.colorToRGBA to get correct color values for profiles themeObserver. r=profiles-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D241229
2025-03-19 14:57:39 +00:00
Norisz Fay
3c61b6da79 Backed out changeset bf1fbdd6bd71 (bug 1950167) for causing profiles related failures 2025-03-17 21:58:44 +02:00
Niklas Baumgardner
3adef40ecc Bug 1950167, 1953316 - Use InspectorUtils.colorToRGBA to get correct color values for profiles themeObserver. r=profiles-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D241229
2025-03-17 16:42:09 +00:00
Dave Townsend
7d1cb65882 Bug 1926997: New profile directories should not be world readable. r=profiles-reviewers,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D241597
2025-03-17 15:08:58 +00:00
Dave Townsend
1c393c8eed Bug 1952597: Fix passing command line arguments to the correct Firefox profile. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D240838
2025-03-10 14:04:20 +00:00
Jared Hirsch
8936495a5b Bug 1933222 - Work around vanishing macos dock icon by overwriting it a second later. r=mossop,spohl,profiles-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D240555
2025-03-06 23:07:34 +00:00
Dave Townsend
6fe220c9fd Bug 1937061: Hide new profile instances from the recent applications section of the dock. r=nika,spohl,profiles-reviewers,jhirsch
Adds an API to nsIMacDockSupport to allow launching an application bundle and hiding it from the
list of recent applications.

Differential Revision: https://phabricator.services.mozilla.com/D238206
2025-03-06 14:28:08 +00:00
Butkovits Atila
847b25f4e8 Backed out changeset 72ea1c22c996 (bug 1937061) for causing failures at test_delete_last_profile.js. 2025-03-06 15:06:44 +02:00
Dave Townsend
8c83e98f5e Bug 1937061: Hide new profile instances from the recent applications section of the dock. r=nika,spohl,profiles-reviewers,jhirsch
Adds an API to nsIMacDockSupport to allow launching an application bundle and hiding it from the
list of recent applications.

Differential Revision: https://phabricator.services.mozilla.com/D238206
2025-03-06 11:32:40 +00:00
Niklas Baumgardner
1fdd122166 Bug 1927925 - Allow last profile to be deleted via SelectableProfileService. r=profiles-reviewers,jhirsch,mossop
Differential Revision: https://phabricator.services.mozilla.com/D239158
2025-03-04 17:18:25 +00:00
Sandor Molnar
45772aceef Backed out changeset 3f5fd40efb0f (bug 1927925) for causing xpc failures @ test_delete_last_profile.js CLOSED TREE 2025-03-03 18:03:46 +02:00
Niklas Baumgardner
811a886162 Bug 1927925 - Allow last profile to be deleted via SelectableProfileService. r=profiles-reviewers,jhirsch,mossop
Differential Revision: https://phabricator.services.mozilla.com/D239158
2025-03-03 15:11:53 +00:00
Cieara Meador
84808154a0 Bug 1936632 - Enable Profiles pref if enrolled in experiment r=emcminn,profiles-reviewers,mossop,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D239216
2025-02-27 16:51:20 +00:00
Niklas Baumgardner
fb210d2cf0 Bug 1927193 - Read color values for default theme in profiles themeObserver. r=profiles-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D237943
2025-02-19 19:33:36 +00:00
Dave Townsend
16739ed121 Bug 1927808: Profiles should remain disabled if BlockAboutProfiles enterprise policy is active. r=mkaply,profiles-reviewers,firefox-desktop-core-reviewers ,Gijs,jhirsch
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D236848
2025-02-18 11:28:15 +00:00
Goloman Adrian
0e650176ac Backed out changeset 23237bed6270 (bug 1927808) for causing xpc failures @test_sync_warning_dialogs.js. CLOSED TREE 2025-02-17 13:45:43 +02:00
Dave Townsend
9ae2b19dba Bug 1927808: Profiles should remain disabled if BlockAboutProfiles enterprise policy is active. r=mkaply,profiles-reviewers,firefox-desktop-core-reviewers ,Gijs,jhirsch
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D236848
2025-02-17 10:52:15 +00:00
Goloman Adrian
260e6fa6bb Backed out changeset cc9c1dbec866 (bug 1927808) for causing multiple failures. CLOSED TREE 2025-02-17 12:20:26 +02:00
Dave Townsend
b4ae0c1ece Bug 1927808: Profiles should remain disabled if BlockAboutProfiles enterprise policy is active. r=mkaply,profiles-reviewers,firefox-desktop-core-reviewers ,Gijs,jhirsch
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D236848
2025-02-17 09:07:43 +00:00
Dave Townsend
906a8c5f30 Bug 1945207: Open URLs passed via NSApplicationDelegate in the correct profile. r=jhirsch,profiles-reviewers
Unlike other platforms on macOS if Firefox is already running and an application wants to open a URL
it doesn't use a command line call. Instead the URLs are passed via the NSApplicationDelegate
instance, our implementation of that creates a new nsICommandLine and runs it through the existing
handlers. This entirely skips the startup logic for choosing the default profile and so URLs are
simply opened in whatever profile happens to be running. Not sure what the precise logic is when
multiple profiles are running, it seems like the oldest one wins, not the most recently used one
which is what we want.

Here we intercept the new command line, attempt to guess if we may need to send it to a different
profile and if so do so by using the normal command line approach which will then use the startup
logic to choose the correct profile to use.

One niggle to this is that macOS also automatically focuses the existing instance of Firefox prior
to sending us the URLs which causes us to immediately switch the default profile. This patch
introduces a delay to that so we process the URLs before the default profile can change.

Differential Revision: https://phabricator.services.mozilla.com/D237221
2025-02-14 14:32:37 +00:00
Norisz Fay
a8aa5a296d Backed out changeset b30669a3b55f (bug 1945207) for causing bc failures on browser_update_profile_on_window_switch.js 2025-02-13 13:10:07 +02:00
Dave Townsend
b624e1ec3a Bug 1945207: Open URLs passed via NSApplicationDelegate in the correct profile. r=jhirsch,profiles-reviewers
Unlike other platforms on macOS if Firefox is already running and an application wants to open a URL
it doesn't use a command line call. Instead the URLs are passed via the NSApplicationDelegate
instance, our implementation of that creates a new nsICommandLine and runs it through the existing
handlers. This entirely skips the startup logic for choosing the default profile and so URLs are
simply opened in whatever profile happens to be running. Not sure what the precise logic is when
multiple profiles are running, it seems like the oldest one wins, not the most recently used one
which is what we want.

Here we intercept the new command line, attempt to guess if we may need to send it to a different
profile and if so do so by using the normal command line approach which will then use the startup
logic to choose the correct profile to use.

One niggle to this is that macOS also automatically focuses the existing instance of Firefox prior
to sending us the URLs which causes us to immediately switch the default profile. This patch
introduces a delay to that so we process the URLs before the default profile can change.

Differential Revision: https://phabricator.services.mozilla.com/D237221
2025-02-13 10:06:41 +00:00
Goloman Adrian
bc8a66a1e1 Backed out changeset 39e6a7e77cfb (bug 1927808) for causing multiple failures. CLOSED TREE 2025-02-06 14:50:21 +02:00
Dave Townsend
89b6c18f30 Bug 1927808: Profiles should remain disabled if BlockAboutProfiles enterprise policy is active. r=mkaply,profiles-reviewers,firefox-desktop-core-reviewers ,Gijs,jhirsch
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D236848
2025-02-06 10:23:36 +00:00
Niklas Baumgardner
04cb067c2d Bug 1936670 - Add alt text to profile avatars. r=profiles-reviewers,fluent-reviewers,jhirsch,flod
Differential Revision: https://phabricator.services.mozilla.com/D235056
2025-01-28 18:49:11 +00:00
Dave Townsend
f4f8b6ccb5 Bug 1931299: Update the taskbar overlay whenever a window activates. r=profiles-reviewers,niklas
Differential Revision: https://phabricator.services.mozilla.com/D235146
2025-01-22 15:31:35 +00:00
Dave Townsend
071a9a4194 Bug 1933422: Set the current profile as the default for the group immediately after launching. r=profiles-reviewers,jhirsch
We set the current profile as default whenever a window activates, but we don't add that listener
until after the first window has activated so the default remains the previous profile until you
change window focus. This always sets the default immediately on startup.

Differential Revision: https://phabricator.services.mozilla.com/D234670
2025-01-17 19:25:01 +00:00
Niklas Baumgardner
05cf0080f5 Bug 1933147 - Initialize user prefs for selectable profile window. r=mossop,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D231954
2025-01-13 17:33:46 +00:00
Dave Townsend
48f5fd3bcf Bug 1934218: Always flush the profile data to disk when changing the selector state or switching windows. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D232623
2025-01-08 15:11:19 +00:00
Sandor Molnar
ce7ef748cb Backed out changeset 19d40900062f (bug 1934218) for causing bc failures @ browser_update_profile_on_window_switch.js CLOSED TREE 2025-01-07 17:02:11 +02:00