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.
Normally a HTTP channel would immediately call AsyncOpenURI leading to the cache storage to lookup the cache entry and return it. In order to simmulate real life conditions where fetching a cache entry takes a long time, we set a timer to delay the operation. Can only be called on the main thread.
the delay in milliseconds until the cache open will be triggered.
Immediatelly triggers AsyncOpenURI if the timer hasn't fired. Can only be called on the main thread. This is only called in tests to reliably trigger the opening of the cache entry.
NS_ERROR_NOT_AVAILABLE if opening the cache wasn't delayed.
TEST ONLY: The following methods are for testing purposes only. Do not use them to do anything important in your code.
Triggers network activity after given timeout. If timeout is 0, network activity is triggered immediately if asyncOpen has already been called. Otherwise the delayed timer will be set when the normal call to TriggerNetwork is made. If the cache.asyncOpenURI callbacks have already been called, the network activity may have already been triggered or the content may have already been delivered from the cache, so this operation will have no effect.
the delay in milliseconds until the network will be triggered.
Generated using TypeDoc
This holds methods used to race the cache with the network for a specific channel. This interface is was designed with nsHttpChannel in mind, and it's expected this will be the only class implementing it.