Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Add permission information for a given principal. It is internally calling the other add() method using the nsIURI from the principal. Passing a system principal will be a no-op because they will always be granted permissions.
Add permanent permission information for a given principal in private browsing.
Normally permissions in private browsing are cleared at the end of the session, this method allows you to override this behavior and set permanent permissions.
WARNING: setting permanent permissions will leak data in private browsing. Only use if you understand the consequences and trade-offs. If you are unsure, |addFromPrincipal| is very likely what you want to use instead.
Get the permission object associated with the given principal and action.
The matching permission object, or null if no matching object was found. No matching object is equivalent to UNKNOWN_ACTION.
Clients in general should prefer the test* methods unless they need to know the specific stored details.
This method will always return null for the system principal.
The principal
A case-sensitive ASCII string identifying the consumer
If true, only the specific host will be matched. If false, base domains of the principal will also be searched.
Clear all permissions of the passed type added since the specified time.
a case-sensitive ASCII string, identifying the permission.
a unix timestamp representing the number of milliseconds from Jan 1, 1970 00:00:00 UTC.
Remove permission information for a given principal. This is internally calling remove() with the host from the principal's URI. Passing system principal will be a no-op because we never add them to the database.
Test whether a website has permission to perform the given action
ignoring active sessions.
System principals will always have permissions granted.
This function will perform a pref lookup to permissions.default.
the principal
a case-sensitive ASCII string, identifying the consumer
Test whether the principal has the permission to perform a given action.
This requires an exact hostname match. Subdomain principals do not match
permissions of base domains.
System principals will always have permissions granted.
This function will perform a pref lookup to permissions.default.
Test whether the principal has the permission to perform a given action.
System principals will always have permissions granted.
This function will perform a pref lookup to permissions.default.
Generated using TypeDoc
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.