Closed Bug 1518587 Opened 6 years ago Closed 6 years ago

Break out the profile selection logic from nsAppRunner.cpp

Categories

(Toolkit :: Startup and Profile System, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: mossop, Assigned: mossop)

References

Details

Attachments

(1 file)

Moves the startup profile selection code from nsAppRunner.cpp to the profile manager.

Currently nsAppRunner is responsible for choosing or creating a profile to use at startup. It then has to create a reset profile if necessary and lock the selected profile directories. But these latter things are done in different places of the selection code and done in different ways, sometimes we delay while trying to get the lock, sometimes we don't. This patch moves the profile selection part of the code to its own function so that then we only have to have one place that does the profile reset and locking logic. It makes a lot of sense to have the selection code live in the profile service. It can use information from the database load to help make the choices and it also means that we can expose the profile selection code through xpcom allowing it to be easily automatically tested. It will also be more important for future patches for the dedicated profiles feature.
Pushed by dtownsend@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/394b490d3e2d Move startup profile selection to nsToolkitProfileService. r=froydnj
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66

When building Firefox for Android I get

50:51.76 In file included from .../mozilla-unified/obj-i686-linux-android/toolkit/xre/Unified_cpp_toolkit_xre0.cpp:119:
50:51.76 .../mozilla-unified/toolkit/xre/nsXREDirProvider.cpp:22:10: fatal error: 'commonupdatedir.h' file not found

Dave, can you take a look?

Flags: needinfo?(dtownsend)

Created Bug 1520139 for these failures, please follow the progress over there. Thank you.

Depends on: 1520193

There's also bug 1520131.

Depends on: 1520131
No longer depends on: 1520193
Depends on: 1522190
No longer depends on: 1522190
Flags: needinfo?(dtownsend)
Depends on: 1525262
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: