1 This Source Code Form is subject to the terms of the Mozilla Public
2 License, v. 2.0. If a copy of the MPL was not distributed with this
3 file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 nsIObserver topics for profile changing. Profile changing happens in phases
6 in the order given below. An observer may register separately for each phase
7 of the process depending on its needs.
9 "profile-change-teardown"
10 All async activity must be stopped in this phase. Typically,
11 the application level observer will close all open windows.
12 This is the last phase in which the subject's vetoChange()
13 method may still be called.
14 The next notification will be either
15 profile-change-teardown-veto or profile-before-change.
17 "profile-before-change"
18 Called before the profile has changed. Use this notification
19 to prepare for the profile going away. If a component is
20 holding any state which needs to be flushed to a profile-relative
21 location, it should be done here.
24 Called after the profile has changed. Do the work to
25 respond to having a new profile. Any change which
26 affects others must be done in this phase.
28 "profile-after-change"
29 Called after the profile has changed. Use this notification
30 to make changes that are dependent on what some other listener
31 did during its profile-do-change. For example, to respond to
34 "profile-initial-state"
35 Called after all phases of a change have completed. Typically
36 in this phase, an application level observer will open a new window.
38 Contexts for profile changes. These are passed as the someData param to the
39 observer's Observe() method.
42 Going from no profile to a profile.
43 The following topics happen in this context:
48 The user is logging out and whatever data the observer stores
49 for the current profile should be released from memory and
51 The following topics happen in this context:
52 profile-change-net-teardown
53 profile-change-teardown
56 See https://wiki.mozilla.org/XPCOM_Shutdown for more details about the shutdown
59 NOTE: Long ago there was be a "shutdown-cleanse" version of shutdown which was
60 intended to clear profile data. This is no longer sent and observer code should
61 remove support for it.