gecko-dev/toolkit/profile
Jared Hirsch 2b2e1c968e Bug 1910716 - Support launching selectable profiles via `--profile` command line option. r=niklas,mossop
1. Modify nsToolkitProfileService to support roaming profiles passed in
   via the "-profile /path/to/profile/" command line option but not
   present in profiles.ini.

With this patch, when a profile is supplied via the "-profile
/path/to/profile/" command line option, if the root dir path is not found
in profiles.ini, and if its path is a relative path, then we either use or
create a corresponding local dir.

Previously for unmanaged profiles, we would not look for a local dir,
instead just using the root dir to hold the various local ephemeral
caches. This change is necessary to prevent degraded filesystem
performance for roaming / enterprise users who adopt selectable
profiles.

This patch also adds roaming profile support for profiles passed in
via XRE_PROFILE_PATH, finding/creating a local dir if the root dir is
relative, event if XRE_PROFILE_LOCAL_PATH is null or does not exist.
These environment variables are typically set as part of an app-managed
restart, for example, after choosing a profile in the Profile Manager.

2. Add a new method to the SelectableProfileService to launch a new
   Firefox instance, using --profile to pass an unmanaged profile path.

This is necessary because selectable profiles will not be listed in
profiles.ini, but users will need to launch them by selecting them in
UI entries (like menu items).

3. Refactor some duplicated code into `EnsureDirExists` and
   `GetLocalDirFromRootDir` helpers in nsToolkitProfileService.

See also bug 1913383 for further planned cleanup work.

4. Add a groupProfile property to nsToolkitProfileService.

This ensures SelectableProfileService.#groupToolkitProfile will always
be set, so that we can set or unset rootDir and StoreID as users upgrade
to multiple profiles, launch Firefox from a selectable profile, or
downgrade back to a single profile.

Differential Revision: https://phabricator.services.mozilla.com/D218149
2024-09-11 15:38:11 +00:00
..
content Bug 1878401 - part 3 - Update nsIFilePicker users in toolkit/ to pass BrowsingContext to init r=extension-reviewers,Gijs,ng,robwu 2024-02-28 21:29:38 +00:00
test Bug 1910716 - Support launching selectable profiles via `--profile` command line option. r=niklas,mossop 2024-09-11 15:38:11 +00:00
ProfileUnlockerAndroid.cpp
ProfileUnlockerAndroid.h
ProfileUnlockerWin.cpp
ProfileUnlockerWin.h
jar.mn
moz.build Bug 1906047 - Move toolkit/profile/ tests into a test sub-directory. r=mossop 2024-07-08 08:51:18 +00:00
notifications.txt
nsIProfileMigrator.idl
nsIProfileUnlocker.idl
nsIToolkitProfile.idl Bug 1893667 - Update startup sequence to allow starting into new profile selector window. r=mossop 2024-08-16 00:31:41 +00:00
nsIToolkitProfileService.idl Bug 1910716 - Support launching selectable profiles via `--profile` command line option. r=niklas,mossop 2024-09-11 15:38:11 +00:00
nsProfileLock.cpp Backed out 3 changesets (bug 1837907) for causing marionette crashes. CLOSED TREE 2023-11-21 15:02:53 +02:00
nsProfileLock.h
nsToolkitProfileService.cpp Bug 1910716 - Support launching selectable profiles via `--profile` command line option. r=niklas,mossop 2024-09-11 15:38:11 +00:00
nsToolkitProfileService.h Bug 1910716 - Support launching selectable profiles via `--profile` command line option. r=niklas,mossop 2024-09-11 15:38:11 +00:00