/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** * This is the principal that has no rights and can't be accessed by * anything other than itself and chrome; null principals are not * same-origin with anything but themselves.
*/
// Create a NullPrincipal, inheriting origin attributes from the given // principal. // If aInheritFrom is a content principal, or has a content principal // precursor, it will be used as the precursor for this principal. static already_AddRefed<NullPrincipal> CreateWithInheritedAttributes(
nsIPrincipal* aInheritFrom);
// Create a new NullPrincipal with the specified OriginAttributes. // // If `aNullPrincipalURI` is specified, it must be a NS_NULLPRINCIPAL_SCHEME // URI previously created using `NullPrincipal::CreateURI`, and will be used // as the origin URI for this principal. static already_AddRefed<NullPrincipal> Create( const OriginAttributes& aOriginAttributes,
nsIURI* aNullPrincipalURI = nullptr);
// Generates a new unique `moz-nullprincipal:` URI. If `aPrecursor` is // specified, it will be included in the generated URI as the null principal's // precursor. // // The `aPrincipalID` attribute is used to force the creation of a // deterministic NullPrincipal in situations where that is required. Avoid // using this parameter unless absolutely necessary. static already_AddRefed<nsIURI> CreateURI(nsIPrincipal* aPrecursor = nullptr, const nsID* aPrincipalID = nullptr);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.