Struct xpcom::interfaces::nsILoadInfo
[−]
[src]
#[repr(C)]pub struct nsILoadInfo { /* fields omitted */ }
interface nsILoadInfo : nsISupports
/**
* The LoadInfo object contains information about a network load, why it
* was started, and how we plan on using the resulting response.
* If a network request is redirected, the new channel will receive a new
* LoadInfo object. The new object will contain mostly the same
* information as the pre-redirect one, but updated as appropriate.
* For detailed information about what parts of LoadInfo are updated on
* redirect, see documentation on individual properties.
*/
Methods
impl nsILoadInfo
[src]
pub fn coerce<T: nsILoadInfoCoerce>(&self) -> &T
[src]
Cast this nsILoadInfo
to one of its base interfaces.
impl nsILoadInfo
[src]
pub const SEC_NORMAL: i64
SEC_NORMAL: i64 = 0
/**
* *** DEPRECATED ***
* No LoadInfo created within Gecko should contain this security flag.
* Please use any of the five security flags defined underneath.
* We only keep this security flag to provide backwards compatibilty.
*/
pub const SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS: i64
SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS: i64 = 1
/**
* The following five flags determine the security mode and hence what kind of
* security checks should be performed throughout the lifetime of the channel.
*
* * SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS
* * SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED
* * SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS
* * SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL
* * SEC_REQUIRE_CORS_DATA_INHERITS
*
* Exactly one of these flags are required to be set in order to allow
* the channel to perform the correct security checks (SOP, CORS, ...) and
* return the correct result principal. If none or more than one of these
* flags are set AsyncOpen2 will fail.
*/
pub const SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED: i64
SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED: i64 = 2
pub const SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS: i64
SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS: i64 = 4
/**
* Allow loads from other origins. Loads from data: will inherit the
* principal. See the documentation for principalToInherit, which describes
* exactly what principal is inherited.
*
* Commonly used by plain <img>, <video>, <link rel=stylesheet> etc.
*/
pub const SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL: i64
SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL: i64 = 8
/**
* Allow loads from other origins. Loads from data: will be allowed,
* but the resulting resource will get a null principal.
* Used in blink/webkit for <iframe>s. Likely also the mode
* that should be used by most Chrome code.
*/
pub const SEC_REQUIRE_CORS_DATA_INHERITS: i64
SEC_REQUIRE_CORS_DATA_INHERITS: i64 = 16
/**
* Allow loads from any origin, but require CORS for cross-origin loads.
* Loads from data: are allowed and the result will inherit the principal.
* See the documentation for principalToInherit, which describes exactly what
* principal is inherited.
*
* Commonly used by <img crossorigin>, <video crossorigin>,
* XHR, fetch(), etc.
*/
pub const SEC_COOKIES_DEFAULT: i64
SEC_COOKIES_DEFAULT: i64 = 0
/**
* Choose cookie policy. The default policy is equivalent to "INCLUDE" for
* SEC_REQUIRE_SAME_ORIGIN_* and SEC_ALLOW_CROSS_ORIGIN_* modes, and
* equivalent to "SAME_ORIGIN" for SEC_REQUIRE_CORS_DATA_INHERITS mode.
*
* This means that if you want to perform a CORS load with credentials, pass
* SEC_COOKIES_INCLUDE.
*
* Note that these flags are still subject to the user's cookie policies.
* For example, if the user is blocking 3rd party cookies, those cookies
* will be blocked no matter which of these flags are set.
*/
pub const SEC_COOKIES_INCLUDE: i64
SEC_COOKIES_INCLUDE: i64 = 32
pub const SEC_COOKIES_SAME_ORIGIN: i64
SEC_COOKIES_SAME_ORIGIN: i64 = 64
pub const SEC_COOKIES_OMIT: i64
SEC_COOKIES_OMIT: i64 = 96
pub const SEC_FORCE_INHERIT_PRINCIPAL: i64
SEC_FORCE_INHERIT_PRINCIPAL: i64 = 128
/**
* Force inheriting of the principal. See the documentation for
* principalToInherit, which describes exactly what principal is inherited.
*
* Setting this flag will cause GetChannelResultPrincipal to return the
* principal to be inherited as the channel principal.
*
* This will happen independently of the scheme of the URI that the
* channel is loading.
*
* So if the principal that gets inherited is "http://a.com/", and the channel
* is loading the URI "http://b.com/whatever", GetChannelResultPrincipal
* will return a principal from "http://a.com/".
*
* This flag can not be used together with SEC_SANDBOXED. If both are passed
* to the LoadInfo constructor then this flag will be dropped. If you need
* to know whether this flag would have been present but was dropped due to
* sandboxing, check for the forceInheritPrincipalDropped flag.
*/
pub const SEC_SANDBOXED: i64
SEC_SANDBOXED: i64 = 256
/**
* Sandbox the load. The resulting resource will use a freshly created
* null principal. So GetChannelResultPrincipal will always return a
* null principal whenever this flag is set.
*
* This will happen independently of the scheme of the URI that the
* channel is loading.
*
* This flag can not be used together with SEC_FORCE_INHERIT_PRINCIPAL.
*/
pub const SEC_ABOUT_BLANK_INHERITS: i64
SEC_ABOUT_BLANK_INHERITS: i64 = 512
/**
* Inherit the Principal for about:blank.
*/
pub const SEC_ALLOW_CHROME: i64
SEC_ALLOW_CHROME: i64 = 1024
/**
* Allow access to chrome: packages that are content accessible.
*/
pub const SEC_DISALLOW_SCRIPT: i64
SEC_DISALLOW_SCRIPT: i64 = 2048
/**
* Disallow access to javascript: uris.
*/
pub const SEC_DONT_FOLLOW_REDIRECTS: i64
SEC_DONT_FOLLOW_REDIRECTS: i64 = 4096
/**
* Don't follow redirects. Instead the redirect response is returned
* as a successful response for the channel.
*
* Redirects not initiated by a server response, i.e. REDIRECT_INTERNAL and
* REDIRECT_STS_UPGRADE, are still followed.
*
* Note: If this flag is set and the channel response is a redirect, then
* the response body might not be available.
* This can happen if the redirect was cached.
*/
pub const SEC_LOAD_ERROR_PAGE: i64
SEC_LOAD_ERROR_PAGE: i64 = 8192
/**
* Load an error page, it should be one of following : about:neterror,
* about:certerror, about:blocked, or about:tabcrashed.
*/
pub const SEC_FORCE_INHERIT_PRINCIPAL_OVERRULE_OWNER: i64
SEC_FORCE_INHERIT_PRINCIPAL_OVERRULE_OWNER: i64 = 16384
/**
* Force inheriting of the principal, overruling any owner that might be set
* on the channel. (Please note that channel.owner is deprecated and will be
* removed within Bug 1286838). See the documentation for principalToInherit,
* which describes exactly what principal is inherited.
*
* Setting this flag will cause GetChannelResultPrincipal to return the
* principal to be inherited as the channel principal.
*
* This will happen independently of the scheme of the URI that the
* channel is loading.
*/
pub const TAINTING_BASIC: i64
TAINTING_BASIC: i64 = 0
/**
* Constants reflecting the channel tainting. These are mainly defined here
* for script. Internal C++ code should use the enum defined in LoadTainting.h.
* See LoadTainting.h for documentation.
*/
pub const TAINTING_CORS: i64
TAINTING_CORS: i64 = 1
pub const TAINTING_OPAQUE: i64
TAINTING_OPAQUE: i64 = 2
pub unsafe fn GetLoadingPrincipal(
&self,
aLoadingPrincipal: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aLoadingPrincipal: *mut *const nsIPrincipal
) -> nsresult
/**
* This is the principal of the network request's caller/requester where
* the resulting resource will be used. I.e. it is the principal which
* will get access to the result of the request. (Where "get access to"
* might simply mean "embed" depending on the type of resource that is
* loaded).
*
* For example for an image, it is the principal of the document where
* the image is rendered. For a stylesheet it is the principal of the
* document where the stylesheet will be applied.
*
* So if document at http://a.com/page.html loads an image from
* http://b.com/pic.jpg, then loadingPrincipal will be
* http://a.com/page.html.
*
* For <iframe> and <frame> loads, the LoadingPrincipal is the
* principal of the parent document. For top-level loads, the
* LoadingPrincipal is null. For all loads except top-level loads
* the LoadingPrincipal is never null.
*
* If the loadingPrincipal is the system principal, no security checks
* will be done at all. There will be no security checks on the initial
* load or any subsequent redirects. This means there will be no
* nsIContentPolicy checks or any CheckLoadURI checks. Because of
* this, never set the loadingPrincipal to the system principal when
* the URI to be loaded is controlled by a webpage.
* If the loadingPrincipal and triggeringPrincipal are both
* codebase-principals, then we will always call into
* nsIContentPolicies and CheckLoadURI. The call to nsIContentPolicies
* and CheckLoadURI happen even if the URI to be loaded is same-origin
* with the loadingPrincipal or triggeringPrincipal.
*/
readonly attribute nsIPrincipal loadingPrincipal;
pub unsafe fn GetTriggeringPrincipal(
&self,
aTriggeringPrincipal: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aTriggeringPrincipal: *mut *const nsIPrincipal
) -> nsresult
/**
* This is the principal which caused the network load to start. I.e.
* this is the principal which provided the URL to be loaded. This is
* often the same as the LoadingPrincipal, but there are a few cases
* where that's not true.
*
* For example for loads into an <iframe>, the LoadingPrincipal is always
* the principal of the parent document. However the triggeringPrincipal
* is the principal of the document which provided the URL that the
* <iframe> is navigating to. This could be the previous document inside
* the <iframe> which set document.location. Or a document elsewhere in
* the frame tree which contained a <a target="..."> which targetted the
* <iframe>.
*
* If a stylesheet links to a sub-resource, like an @imported stylesheet,
* or a background image, then the triggeringPrincipal is the principal
* of the stylesheet, while the LoadingPrincipal is the principal of the
* document being styled.
*
* The triggeringPrincipal is never null.
*
* If the triggeringPrincipal is the system principal, no security checks
* will be done at all. There will be no security checks on the initial
* load or any subsequent redirects. This means there will be no
* nsIContentPolicy checks or any CheckLoadURI checks. Because of
* this, never set the triggeringPrincipal to the system principal when
* the URI to be loaded is controlled by a webpage.
* If the loadingPrincipal and triggeringPrincipal are both
* codebase-principals, then we will always call into
* nsIContentPolicies and CheckLoadURI. The call to nsIContentPolicies
* and CheckLoadURI happen even if the URI to be loaded is same-origin
* with the loadingPrincipal or triggeringPrincipal.
*/
readonly attribute nsIPrincipal triggeringPrincipal;
pub unsafe fn GetPrincipalToInherit(
&self,
aPrincipalToInherit: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aPrincipalToInherit: *mut *const nsIPrincipal
) -> nsresult
/**
* For non-document loads the principalToInherit is always null. For
* loads of type TYPE_DOCUMENT or TYPE_SUBDOCUMENT the principalToInherit
* might be null. If it's non null, then this is the principal that is
* inherited if a principal needs to be inherited. If the principalToInherit
* is null but the inherit flag is set, then the triggeringPrincipal is
* the principal that is inherited.
*/
attribute nsIPrincipal principalToInherit;
pub unsafe fn SetPrincipalToInherit(
&self,
aPrincipalToInherit: *const nsIPrincipal
) -> nsresult
[src]
&self,
aPrincipalToInherit: *const nsIPrincipal
) -> nsresult
/**
* For non-document loads the principalToInherit is always null. For
* loads of type TYPE_DOCUMENT or TYPE_SUBDOCUMENT the principalToInherit
* might be null. If it's non null, then this is the principal that is
* inherited if a principal needs to be inherited. If the principalToInherit
* is null but the inherit flag is set, then the triggeringPrincipal is
* the principal that is inherited.
*/
attribute nsIPrincipal principalToInherit;
pub unsafe fn GetLoadingDocument(
&self,
aLoadingDocument: *mut *const nsIDOMDocument
) -> nsresult
[src]
&self,
aLoadingDocument: *mut *const nsIDOMDocument
) -> nsresult
/**
* This is the ownerDocument of the LoadingNode. Unless the LoadingNode
* is a Document, in which case the LoadingDocument is the same as the
* LoadingNode.
*
* For top-level loads, and for loads originating from workers, the
* LoadingDocument is null. When the LoadingDocument is not null, the
* LoadingPrincipal is set to the principal of the LoadingDocument.
*/
readonly attribute nsIDOMDocument loadingDocument;
pub unsafe fn GetSecurityFlags(
&self,
aSecurityFlags: *mut nsSecurityFlags
) -> nsresult
[src]
&self,
aSecurityFlags: *mut nsSecurityFlags
) -> nsresult
/**
* The securityFlags of that channel.
*/
readonly attribute nsSecurityFlags securityFlags;
pub unsafe fn GetSecurityMode(&self) -> uint32_t
[src]
/**
* Allows to query only the security mode bits from above.
*/
[infallible] readonly attribute unsigned long securityMode;
pub unsafe fn GetIsInThirdPartyContext(&self) -> bool
[src]
/**
* True if this request is embedded in a context that can't be third-party
* (i.e. an iframe embedded in a cross-origin parent window). If this is
* false, then this request may be third-party if it's a third-party to
* loadingPrincipal.
*/
[infallible] readonly attribute boolean isInThirdPartyContext;
pub unsafe fn GetCookiePolicy(&self) -> uint32_t
[src]
/**
* See the SEC_COOKIES_* flags above. This attribute will never return
* SEC_COOKIES_DEFAULT, but will instead return what the policy resolves to.
* I.e. SEC_COOKIES_SAME_ORIGIN for CORS mode, and SEC_COOKIES_INCLUDE
* otherwise.
*/
[infallible] readonly attribute unsigned long cookiePolicy;
pub unsafe fn GetForceInheritPrincipal(&self) -> bool
[src]
/**
* If forceInheritPrincipal is true, the data coming from the channel should
* inherit its principal, even when the data is loaded over http:// or another
* protocol that would normally use a URI-based principal.
*
* See the documentation for principalToInherit, which describes exactly what
* principal is inherited.
*
* This attribute will never be true when loadingSandboxed is true.
*/
[infallible] readonly attribute boolean forceInheritPrincipal;
pub unsafe fn GetForceInheritPrincipalOverruleOwner(&self) -> bool
[src]
/**
* If forceInheritPrincipalOverruleOwner is true, the data coming from the
* channel should inherit the principal, even when the data is loaded over
* http:// or another protocol that would normally use a URI-based principal
* and even if the channel's .owner is not null. This last is the difference
* between forceInheritPrincipalOverruleOwner and forceInheritPrincipal: the
* latter does _not_ overrule the .owner setting.
*
* See the documentation for principalToInherit, which describes exactly what
* principal is inherited.
*/
[infallible] readonly attribute boolean forceInheritPrincipalOverruleOwner;
pub unsafe fn GetLoadingSandboxed(&self) -> bool
[src]
/**
* If loadingSandboxed is true, the data coming from the channel is
* being loaded sandboxed, so it should have a nonce origin and
* hence should use a NullPrincipal.
*/
[infallible] readonly attribute boolean loadingSandboxed;
pub unsafe fn GetAboutBlankInherits(&self) -> bool
[src]
/**
* If aboutBlankInherits is true, then about:blank should inherit
* the principal.
*/
[infallible] readonly attribute boolean aboutBlankInherits;
pub unsafe fn GetAllowChrome(&self) -> bool
[src]
/**
* If allowChrome is true, then use nsIScriptSecurityManager::ALLOW_CHROME
* when calling CheckLoadURIWithPrincipal().
*/
[infallible] readonly attribute boolean allowChrome;
pub unsafe fn GetDisallowScript(&self) -> bool
[src]
/**
* If disallowScript is true, then use nsIScriptSecurityManager::DISALLOW_SCRIPT
* when calling CheckLoadURIWithPrincipal().
*/
[infallible] readonly attribute boolean disallowScript;
pub unsafe fn GetDontFollowRedirects(&self) -> bool
[src]
/**
* Returns true if SEC_DONT_FOLLOW_REDIRECTS is set.
*/
[infallible] readonly attribute boolean dontFollowRedirects;
pub unsafe fn GetLoadErrorPage(&self) -> bool
[src]
/**
* Returns true if SEC_LOAD_ERROR_PAGE is set.
*/
[infallible] readonly attribute boolean loadErrorPage;
pub unsafe fn GetExternalContentPolicyType(
&self,
aExternalContentPolicyType: *mut nsContentPolicyType
) -> nsresult
[src]
&self,
aExternalContentPolicyType: *mut nsContentPolicyType
) -> nsresult
/**
* The external contentPolicyType of the channel, used for security checks
* like Mixed Content Blocking and Content Security Policy.
*
* Specifically, content policy types with _INTERNAL_ in their name will
* never get returned from this attribute.
*/
readonly attribute nsContentPolicyType externalContentPolicyType;
pub unsafe fn InternalContentPolicyType(&self) -> nsContentPolicyType
[src]
/**
* The internal contentPolicyType of the channel, used for constructing
* RequestContext values when creating a fetch event for an intercepted
* channel.
*
* This should not be used for the purposes of security checks, since
* the content policy implementations cannot be expected to deal with
* _INTERNAL_ values. Please use the contentPolicyType attribute above
* for that purpose.
*/
[noscript,notxpcom] nsContentPolicyType internalContentPolicyType ();
pub unsafe fn GetUpgradeInsecureRequests(&self) -> bool
[src]
/**
* Returns true if document or any of the documents ancestors
* up to the toplevel document make use of the CSP directive
* 'upgrade-insecure-requests'. Used to identify upgrade
* requests in e10s where the loadingDocument is not available.
*
* Warning: If the loadingDocument is null, then the
* upgradeInsecureRequests is false.
*/
[infallible] readonly attribute boolean upgradeInsecureRequests;
pub unsafe fn GetVerifySignedContent(&self) -> bool
[src]
/**
* If true, the content of the channel is queued up and checked
* if it matches a content signature. Note, setting this flag
* to true will negatively impact performance since the preloader
* can not start until all of the content is fetched from the
* netwerk.
*
* Only use that in combination with TYPE_DOCUMENT.
*/
[infallible] attribute boolean verifySignedContent;
pub unsafe fn SetVerifySignedContent(
&self,
aVerifySignedContent: bool
) -> nsresult
[src]
&self,
aVerifySignedContent: bool
) -> nsresult
/**
* If true, the content of the channel is queued up and checked
* if it matches a content signature. Note, setting this flag
* to true will negatively impact performance since the preloader
* can not start until all of the content is fetched from the
* netwerk.
*
* Only use that in combination with TYPE_DOCUMENT.
*/
[infallible] attribute boolean verifySignedContent;
pub unsafe fn GetEnforceSRI(&self) -> bool
[src]
/**
* If true, this load will fail if it has no SRI integrity
*/
[infallible] attribute boolean enforceSRI;
pub unsafe fn SetEnforceSRI(&self, aEnforceSRI: bool) -> nsresult
[src]
/**
* If true, this load will fail if it has no SRI integrity
*/
[infallible] attribute boolean enforceSRI;
pub unsafe fn GetForceAllowDataURI(&self) -> bool
[src]
/**
* If true, toplevel data: URI navigation is allowed
*/
[infallible] attribute boolean forceAllowDataURI;
pub unsafe fn SetForceAllowDataURI(&self, aForceAllowDataURI: bool) -> nsresult
[src]
/**
* If true, toplevel data: URI navigation is allowed
*/
[infallible] attribute boolean forceAllowDataURI;
pub unsafe fn GetForceInheritPrincipalDropped(&self) -> bool
[src]
/**
* The SEC_FORCE_INHERIT_PRINCIPAL flag may be dropped when a load info
* object is created. Specifically, it will be dropped if the SEC_SANDBOXED
* flag is also present. This flag is set if SEC_FORCE_INHERIT_PRINCIPAL was
* dropped.
*/
[infallible] readonly attribute boolean forceInheritPrincipalDropped;
pub unsafe fn GetInnerWindowID(&self) -> uint64_t
[src]
/**
* These are the window IDs of the window in which the element being
* loaded lives. parentOuterWindowID is the window ID of this window's
* parent. topOuterWindowID is the ID of the top-level window of the same
* docShell type.
*
* Note that these window IDs can be 0 if the window is not
* available. parentOuterWindowID and topOuterWindowID will be the same as
* outerWindowID if the window has no parent.
*/
[infallible] readonly attribute unsigned long long innerWindowID;
pub unsafe fn GetOuterWindowID(&self) -> uint64_t
[src]
[infallible] readonly attribute unsigned long long outerWindowID;
pub unsafe fn GetParentOuterWindowID(&self) -> uint64_t
[src]
[infallible] readonly attribute unsigned long long parentOuterWindowID;
pub unsafe fn GetTopOuterWindowID(&self) -> uint64_t
[src]
[infallible] readonly attribute unsigned long long topOuterWindowID;
pub unsafe fn GetFrameOuterWindowID(&self) -> uint64_t
[src]
/**
* Only when the element being loaded is <frame src="foo.html">
* (or, more generally, if the element QIs to nsIFrameLoaderOwner),
* the frameOuterWindowID is the outer window containing the
* foo.html document.
*
* Note: For other cases, frameOuterWindowID is 0.
*/
[infallible] readonly attribute unsigned long long frameOuterWindowID;
pub unsafe fn ResetPrincipalToInheritToNullPrincipal(&self) -> nsresult
[src]
/**
* Resets the PrincipalToInherit to a freshly created NullPrincipal
* which inherits the origin attributes from the loadInfo.
*
* WARNING: Please only use that function if you know exactly what
* you are doing!!!
*/
void resetPrincipalToInheritToNullPrincipal ();
pub unsafe fn GetEnforceSecurity(&self) -> bool
[src]
/**
* Whenever a channel is openend by asyncOpen2() [or also open2()],
* lets set this flag so that redirects of such channels are also
* openend using asyncOpen2() [open2()].
*
* Please note, once the flag is set to true it must remain true
* throughout the lifetime of the channel. Trying to set it
* to anything else than true will be discareded.
*
*/
[infallible] attribute boolean enforceSecurity;
pub unsafe fn SetEnforceSecurity(&self, aEnforceSecurity: bool) -> nsresult
[src]
/**
* Whenever a channel is openend by asyncOpen2() [or also open2()],
* lets set this flag so that redirects of such channels are also
* openend using asyncOpen2() [open2()].
*
* Please note, once the flag is set to true it must remain true
* throughout the lifetime of the channel. Trying to set it
* to anything else than true will be discareded.
*
*/
[infallible] attribute boolean enforceSecurity;
pub unsafe fn GetInitialSecurityCheckDone(&self) -> bool
[src]
/**
* Whenever a channel is evaluated by the ContentSecurityManager
* the first time, we set this flag to true to indicate that
* subsequent calls of AsyncOpen2() do not have to enforce all
* security checks again. E.g., after a redirect there is no
* need to set up CORS again. We need this separate flag
* because the redirectChain might also contain internal
* redirects which might pollute the redirectChain so we can't
* rely on the size of the redirectChain-array to query whether
* a channel got redirected or not.
*
* Please note, once the flag is set to true it must remain true
* throughout the lifetime of the channel. Trying to set it
* to anything else than true will be discarded.
*
*/
[infallible] attribute boolean initialSecurityCheckDone;
pub unsafe fn SetInitialSecurityCheckDone(
&self,
aInitialSecurityCheckDone: bool
) -> nsresult
[src]
&self,
aInitialSecurityCheckDone: bool
) -> nsresult
/**
* Whenever a channel is evaluated by the ContentSecurityManager
* the first time, we set this flag to true to indicate that
* subsequent calls of AsyncOpen2() do not have to enforce all
* security checks again. E.g., after a redirect there is no
* need to set up CORS again. We need this separate flag
* because the redirectChain might also contain internal
* redirects which might pollute the redirectChain so we can't
* rely on the size of the redirectChain-array to query whether
* a channel got redirected or not.
*
* Please note, once the flag is set to true it must remain true
* throughout the lifetime of the channel. Trying to set it
* to anything else than true will be discarded.
*
*/
[infallible] attribute boolean initialSecurityCheckDone;
pub unsafe fn GetLoadTriggeredFromExternal(&self) -> bool
[src]
/**
* Returns true if the load was triggered from an external application
* (e.g. Thunderbird). Please note that this flag will only ever be true
* if the load is of TYPE_DOCUMENT.
*/
[infallible] attribute boolean loadTriggeredFromExternal;
pub unsafe fn SetLoadTriggeredFromExternal(
&self,
aLoadTriggeredFromExternal: bool
) -> nsresult
[src]
&self,
aLoadTriggeredFromExternal: bool
) -> nsresult
/**
* Returns true if the load was triggered from an external application
* (e.g. Thunderbird). Please note that this flag will only ever be true
* if the load is of TYPE_DOCUMENT.
*/
[infallible] attribute boolean loadTriggeredFromExternal;
pub unsafe fn GetServiceWorkerTaintingSynthesized(&self) -> bool
[src]
/**
* True if the tainting has been set by the service worker.
*/
[infallible,noscript] readonly attribute boolean serviceWorkerTaintingSynthesized;
pub unsafe fn AppendRedirectHistoryEntry(
&self,
entry: *const nsIRedirectHistoryEntry,
isInternalRedirect: bool
) -> nsresult
[src]
&self,
entry: *const nsIRedirectHistoryEntry,
isInternalRedirect: bool
) -> nsresult
/**
* Whenever a channel gets redirected, append the redirect history entry of
* the channel which contains principal referrer and remote address [before
* the channels got redirected] to the loadinfo, so that at every point this
* array provides us information about all the redirects this channel went
* through.
* @param entry, the nsIRedirectHistoryEntry before the channel
* got redirected.
* @param aIsInternalRedirect should be true if the channel is going
* through an internal redirect, otherwise false.
*/
void appendRedirectHistoryEntry (in nsIRedirectHistoryEntry entry, in boolean isInternalRedirect);
pub unsafe fn GetForcePreflight(&self) -> bool
[src]
/**
* Returns value set through setCorsPreflightInfo.
*/
[infallible] readonly attribute boolean forcePreflight;
pub unsafe fn GetIsPreflight(&self) -> bool
[src]
/**
* A C++ friendly getter for the forcePreflight flag.
*/
[infallible] readonly attribute boolean isPreflight;
pub unsafe fn GetForceHSTSPriming(&self) -> bool
[src]
/**
* When this request would be mixed-content and we do not have an
* entry in the HSTS cache, we send an HSTS priming request to
* determine if it is ok to upgrade the request to HTTPS.
*/
/**
* True if this is a mixed-content load and HSTS priming request will be sent.
*/
[infallible,noscript] readonly attribute boolean forceHSTSPriming;
pub unsafe fn GetMixedContentWouldBlock(&self) -> bool
[src]
/**
* Carry the decision whether this load would be blocked by mixed content so
* that if HSTS priming fails, the correct decision can be made.
*/
[infallible,noscript] readonly attribute boolean mixedContentWouldBlock;
pub unsafe fn GetIsHSTSPriming(&self) -> bool
[src]
/**
* True if this load is an HSTS priming request.
*/
[infallible,noscript] attribute boolean isHSTSPriming;
pub unsafe fn SetIsHSTSPriming(&self, aIsHSTSPriming: bool) -> nsresult
[src]
/**
* True if this load is an HSTS priming request.
*/
[infallible,noscript] attribute boolean isHSTSPriming;
pub unsafe fn GetIsHSTSPrimingUpgrade(&self) -> bool
[src]
/**
* True if this load was upgraded from HSTS priming
*/
[infallible,noscript] attribute boolean isHSTSPrimingUpgrade;
pub unsafe fn SetIsHSTSPrimingUpgrade(
&self,
aIsHSTSPrimingUpgrade: bool
) -> nsresult
[src]
&self,
aIsHSTSPrimingUpgrade: bool
) -> nsresult
/**
* True if this load was upgraded from HSTS priming
*/
[infallible,noscript] attribute boolean isHSTSPrimingUpgrade;
pub unsafe fn GetTainting(&self, aTainting: *mut uint32_t) -> nsresult
[src]
/**
* Determine the associated channel's current tainting. Note, this can
* change due to a service worker intercept, so it should be checked after
* OnStartRequest() fires.
*/
readonly attribute unsigned long tainting;
pub unsafe fn MaybeIncreaseTainting(&self, aTainting: uint32_t) -> nsresult
[src]
/**
* Note a new tainting level and possibly increase the current tainting
* to match. If the tainting level is already greater than the given
* value, then there is no effect. It is not possible to reduce the tainting
* level on an existing channel/loadinfo.
*/
void maybeIncreaseTainting (in unsigned long aTainting);
pub unsafe fn GetIsTopLevelLoad(&self) -> bool
[src]
/**
* Various helper code to provide more convenient C++ access to the tainting
* attribute and maybeIncreaseTainting().
*/
/**
* Returns true if this load is for top level document.
* Note that the load for a sub-frame's document will return false here.
*/
[infallible] readonly attribute boolean isTopLevelLoad;
pub unsafe fn GetResultPrincipalURI(
&self,
aResultPrincipalURI: *mut *const nsIURI
) -> nsresult
[src]
&self,
aResultPrincipalURI: *mut *const nsIURI
) -> nsresult
/**
* If this is non-null, this property represents two things: (1) the
* URI to be used for the principal if the channel with this loadinfo
* gets a principal based on URI and (2) the URI to use for a document
* created from the channel with this loadinfo.
*/
attribute nsIURI resultPrincipalURI;
pub unsafe fn SetResultPrincipalURI(
&self,
aResultPrincipalURI: *const nsIURI
) -> nsresult
[src]
&self,
aResultPrincipalURI: *const nsIURI
) -> nsresult
/**
* If this is non-null, this property represents two things: (1) the
* URI to be used for the principal if the channel with this loadinfo
* gets a principal based on URI and (2) the URI to use for a document
* created from the channel with this loadinfo.
*/
attribute nsIURI resultPrincipalURI;
pub unsafe fn GetSandboxedLoadingPrincipal(
&self,
aSandboxedLoadingPrincipal: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aSandboxedLoadingPrincipal: *mut *const nsIPrincipal
) -> nsresult
/**
* Returns the null principal of the resulting resource if the SEC_SANDBOXED
* flag is set. Otherwise returns null. This is used by
* GetChannelResultPrincipal() to ensure that the same null principal object
* is returned every time.
*/
[noscript] readonly attribute nsIPrincipal sandboxedLoadingPrincipal;
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsILoadInfo
[src]
const IID: nsIID
IID: nsIID = nsID(3720764409, 12128, 16811, [178, 42, 79, 26, 233, 239, 205, 54])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsILoadInfo
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsILoadInfo
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.