Interface nsIToolkitProfileServiceType

Hierarchy

Properties

currentProfile: nsIToolkitProfile

The profile currently in use if it is a named profile. This will return null if the current profile path doesn't match a profile in the database.

defaultProfile: nsIToolkitProfile

The default profile for this build. On startup this is the profile selected unless overridden by command line arguments or environment variables. Setting this will change the profile used by default the next time the application is started. Attempting to change the default may throw an exception on builds that do not support changing the default profile, such as developer edition.

isListOutdated: boolean

Tests whether the profile lists on disk have changed since they were loaded. When this is true attempts to flush changes to disk will fail.

profileCount: number

Returns the number of profiles.

Returns

the number of profiles.

profiles: nsISimpleEnumerator
startWithLastProfile: boolean

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Create a new profile.

    The profile temporary directory will be chosen based on where the profile directory is located.

    If a profile with the given name already exists it will be returned instead of creating a new profile.

    Parameters

    • aRootDir: nsIFile

      The profile directory. May be null, in which case a suitable default will be chosen based on the profile name.

    • aName: string

      The profile name.

    Returns nsIToolkitProfile

  • Create a new profile with a unique name.

    As above however the name given will be altered to make it a unique profile name.

    Parameters

    • aRootDir: nsIFile

      The profile directory. May be null, in which case a suitable default will be chosen based on the profile name.

    • aNamePrefix: string

      The prefix to use for the profile name. If unused this will be used as the profile name otherwise additional characters will be added to make the name unique.

    Returns nsIToolkitProfile

  • Flush the profiles list file. This will fail with NS_ERROR_DATABASE_CHANGED if the files on disk have changed since the profiles were loaded.

    Returns void

  • Get a profile by name. This is mainly for use by the -P commandline flag.

    Parameters

    • aName: string

      The profile name to find.

    Returns nsIToolkitProfile

  • Selects or creates a profile to use based on the profiles database, any environment variables and any command line arguments. Will not create a profile if aIsResetting is true. The profile is selected based on this order of preference:

    • Environment variables (set when restarting the application).
    • --profile command line argument.
    • --createprofile command line argument (this also causes the app to exit).
    • -p command line argument.
    • A new profile created if this is the first run of the application.
    • The default profile. aRootDir and aLocalDir are set to the data and local directories for the profile data. If a profile from the database was selected it will be returned in aProfile. This returns true if a new profile was created. This method is primarily for testing. It can be called only once.

    Parameters

    • aArgv: invalid
    • aIsResetting: boolean
    • aUpdateChannel: string
    • aLegacyInstallHash: string
    • aRootDir: nsIFile
    • aLocalDir: nsIFile
    • aProfile: nsIToolkitProfile

    Returns bool

Generated using TypeDoc