Interface nsIQuotaManagerServiceType

Hierarchy

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

  • Removes all storages. The files may not be deleted immediately depending on prohibitive concurrent operations. Be careful, this removes all the data that has ever been stored!

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Returns nsIQuotaRequest

  • Removes all storages stored for the given principal. The files may not be deleted immediately depending on prohibitive concurrent operations.

    Parameters

    • aPrincipal: nsIPrincipal

      A principal for the origin whose storages are to be cleared.

    • aPersistenceType: string

      An optional string that tells what persistence type of storages will be cleared. If omitted (or void), all persistence types will be cleared for the principal. If a single persistence type ("persistent", "temporary", or "default") is provided, then only that persistence directory will be considered. Note that "persistent" is different than being "persisted" via persist() and is only for chrome principals. See bug 1354500 for more info. In general, null is the right thing to pass here.

    • aClientType: string

      An optional string that tells what client type of storages will be cleared. If omitted (or void), all client types will be cleared for the principal. If a single client type is provided from Client.h, then only that client's storage will be cleared. If you want to clear multiple client types (but not all), then you must call this method multiple times.

    • aClearAll: boolean

      An optional boolean to indicate clearing all storages under the given origin.

    Returns nsIQuotaRequest

  • Given an origin, asynchronously calculate its group quota usage and quota limit. An origin's group is the set of all origins that share the same eTLD+1. This method is intended to be used for our implementation of the StorageManager.estimate() method. When we fix bug 1305665 and stop tracking quota limits on a group basis, this method will switch to operating on origins. Callers should strongly consider whether they want to be using getUsageForPrincipal() instead.

    This mechanism uses cached quota values and does not perform any I/O on its own, but it may be delayed by QuotaManager operations that do need to perform I/O on the QuotaManager I/O thread.

    Parameters

    • aPrincipal: nsIPrincipal

      A principal for the origin (group) which we want to estimate.

    Returns nsIQuotaRequest

  • Gets full origin metadata cached in memory for the given persistence type and origin.

    NOTE: This operation may still be delayed by other operations on the QM I/O thread that are peforming I/O.

    Parameters

    • aPersistenceType: string

      A string that tells what persistence type will be used for getting the metadata (either "temporary" or "default").

    • aPrincipal: nsIPrincipal

      A principal that tells which origin will be used for getting the metadata.

    Returns nsIQuotaRequest

  • Schedules an asynchronous callback that will inspect all origins and return the total amount of disk space being used by storages for each origin separately.

    Parameters

    • aCallback: nsIQuotaUsageCallback

      The callback that will be called when the usage is available.

    • aGetAll: boolean

      An optional boolean to indicate inspection of all origins, including internal ones.

    Returns nsIQuotaUsageRequest

  • Schedules an asynchronous callback that will return the total amount of disk space being used by storages for the given origin.

    Parameters

    • aPrincipal: nsIPrincipal

      A principal for the origin whose usage is being queried.

    • aCallback: nsIQuotaUsageCallback

      The callback that will be called when the usage is available.

    • aFromMemory: boolean

      An optional flag to indicate whether the cached usage should be obtained. The default value is false. Note that this operation may still be delayed by other operations on the QM I/O thread that are peforming I/O. Note: Origin usage here represents total usage of an origin. However, cached usage here represents only non-persistent usage of an origin.

    Returns nsIQuotaUsageRequest

  • Initializes storage directory. This can be used in tests to verify upgrade methods.

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Returns nsIQuotaRequest

  • Initializes temporary storage. This can be used in tests to verify temporary storage initialization.

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Returns nsIQuotaRequest

  • Initializes persistent origin directory for the given origin. This can be used in tests to verify origin initialization.

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Parameters

    • aPrincipal: nsIPrincipal

      A principal for the origin whose directory is to be initialized.

    Returns nsIQuotaRequest

  • Initializes temporary origin directory for the given origin. This can be used in tests to verify origin initialization.

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Parameters

    • aPersistenceType: string

      A string that tells what persistence type of origin will be initialized (temporary or default).

    • aPrincipal: nsIPrincipal

      A principal for the origin whose directory is to be initialized.

    Returns nsIQuotaRequest

  • Asynchronously lists all origins and returns them as plain strings.

    Returns nsIQuotaRequest

  • Persist given origin.

    Parameters

    • aPrincipal: nsIPrincipal

      A principal for the origin which we want to persist.

    Returns nsIQuotaRequest

  • Check if given origin is persisted.

    Parameters

    • aPrincipal: nsIPrincipal

      A principal for the origin which we want to check.

    Returns nsIQuotaRequest

  • Resets quota and storage management. This can be used to force reinitialization of the temp storage, for example when the pref for overriding the temp storage limit has changed. Be carefull, this invalidates all live storages!

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Returns nsIQuotaRequest

  • Resets all storages stored for the given principal.

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Parameters

    • aPrincipal: nsIPrincipal

      A principal for the origin whose storages are to be reset.

    • aPersistenceType: string

      An optional string that tells what persistence type of storages will be reset. If omitted (or void), all persistence types will be cleared for the principal. If a single persistence type ("persistent", "temporary", or "default") is provided, then only that persistence directory will be considered. Note that "persistent" is different than being "persisted" via persist() and is only for chrome principals. See bug 1354500 for more info. In general, null is the right thing to pass here.

    • aClientType: string

      An optional string that tells what client type of storages will be reset. If omitted (or void), all client types will be cleared for the principal. If a single client type is provided from Client.h, then only that client's storage will be cleared. If you want to clear multiple client types (but not all), then you must call this method multiple times.

    Returns nsIQuotaRequest

  • Check if storage is initialized.

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Returns nsIQuotaRequest

  • Asynchronously retrieves storage name and returns it as a plain string.

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Returns nsIQuotaRequest

  • Check if temporary storage is initialized.

    If the dom.quotaManager.testing preference is not true the call will be a no-op.

    Returns nsIQuotaRequest

Generated using TypeDoc