Interface nsIInterceptedChannelType

Interface to allow implementors of nsINetworkInterceptController to control the behaviour of intercepted channels without tying implementation details of the interception to the actual channel. nsIInterceptedChannel is expected to be implemented by objects which do not implement nsIChannel.

Hierarchy

Properties

channel: nsIChannel

The underlying channel object that was intercepted.

consoleReportCollector: nsIConsoleReportCollector
internalContentPolicyType: nsContentPolicyType

Get the internal load type from the underlying channel.

secureUpgradedChannelURI: nsIURI

The URL of the underlying channel object, corrected for a potential secure upgrade.

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

  • This method indicates if the ServiceWorker Interception is reset to network or not.

    Returns bool

  • 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

  • Parameters

    • aTimeStamp: TimeStamp

    Returns void

  • Parameters

    • aTimeStamp: TimeStamp

    Returns void

  • Cancel the pending intercepted request.

    Returns

    NS_ERROR_FAILURE if the response has already been synthesized or the original request has been instructed to continue.

    Parameters

    • status: number

    Returns void

  • Instruct a channel that has been intercepted that response synthesis has completed and all outstanding resources can be closed.

    Returns void

  • Instruct a channel that has been intercepted to continue with the original network request.

    For our mitigations, we support this reset triggering "bypass" mode which results in the resulting client not being controlled.

    Parameters

    • bypass: boolean

    Returns void

  • This method allows to override the channel info for the channel.

    Parameters

    • channelInfo: ChannelInfo

    Returns void

  • Allow the ServiceWorkerManager to set an RAII-style object on the intercepted channel that should be released once the channel is torn down.

    Parameters

    • aHandle: nsISupports

    Returns void

  • Instruct a channel that has been intercepted that a response is starting to be synthesized. No further header modification is allowed after this point. There are a few parameters:

    • A body stream may be optionally passed. If nullptr, then an empty body is assumed.
    • A callback may be optionally passed. It will be invoked when the body is complete. For a nullptr body this may be synchronously on the current thread. Otherwise it will be invoked asynchronously on the current thread.
    • A cacheInfoChannel may be optionally passed. If the body stream is from alternative data cache, this cacheInfoChannel provides needed cache information.
    • The caller may optionally pass a spec for a URL that this response originates from; an empty string will cause the original intercepted request's URL to be used instead.
    • The responseRedirected flag is false will cause the channel do an internal redirect when the original intercepted reauest's URL is different from the response's URL. The flag is true will cause the chaanel do a non-internal redirect when the URLs are different.

    Parameters

    • body: nsIInputStream
    • callback: nsIInterceptedBodyCallback
    • channel: nsICacheInfoChannel
    • finalURLSpec: string
    • responseRedirected: bool

    Returns void

  • Attach a header name/value pair to the forthcoming synthesized response. Overwrites any existing header value.

    Parameters

    • name: string
    • value: string

    Returns void

  • Set the status and reason for the forthcoming synthesized response. Multiple calls overwrite existing values.

    Parameters

    • status: uint16_t
    • reason: string

    Returns void

Generated using TypeDoc