Closed Bug 390771 Opened 17 years ago Closed 17 years ago

Want to be able to "switch" profile

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(1 file, 1 obsolete file)

I'd like to emulate SeaMonkey's profile switching. My idea is as follows:
1. Register the toolkit profile service, even when we're starting normally
2. Switch Profile opens the profile selection dialog with a flag
3. If the dialog is not cancelled then it tries to restart using that profile
Attached patch Proof of concept (obsolete) — Splinter Review
This just shows how it would be possible to open the profile selection dialog.
More work on the dialog itself would be necessary.

I'd probably also want to port the fixes to the old profile dialog.
nsIToolkitProfileService makes all kinds of assumptions about the nsIToolkitProfile objects it is passing around. If we're going to do this we should significantly harden it to ensure that the correct object is getting passed around (e.g. in nsToolkitProfileService::SetSelectedProfile). Also I don't particularly want to parse the profiles.ini file and set up a bunch of objects at every startup, so we'd need to lazy-load the service (perhaps by separating the factory and service objects).

I'm not sure that I want to share the UI: does it make more sense to seamonkey to ship its own profile-switching UI?
Attached patch Backend patchSplinter Review
* Creates a separate nsToolkitProfileFactory object
* ToolkitProfileFactory returns the existing instance if any
* Profile service factory is registered during normal startup
* Static cast eliminated (looked unsafe but probably wasn't)
Assignee: nobody → neil
Attachment #275093 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #275684 - Flags: review?(benjamin)
Attachment #275684 - Flags: review?(benjamin) → review+
Fix checked in.

I'll resolve this and do the UI in a separate bug.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: