Package 

Class NetworkEventManager


  • 
    public final class NetworkEventManager
    
                        

    There are four possible orders of events: A. onRequestWillBeSent B. onRequestWillBeSent, onRequestPaused C. onRequestPaused, onRequestWillBeSent D. onRequestPaused, onRequestWillBeSent, onRequestPaused, onRequestWillBeSent, onRequestPaused, onRequestPaused (see crbug.com/1196004)

    For onRequest we need the event from onRequestWillBeSent and optionally the interceptionId from onRequestPaused.

    If request interception is disabled, call onRequest once per call to onRequestWillBeSent. If request interception is enabled, call onRequest once per call to onRequestPaused (once per interceptionId).

    Events are stored to allow for subsequent events to call onRequest.

    Note that (chains of) redirect requests have the same requestId (!) as the original request. We have to anticipate series of events like these: A. onRequestWillBeSent, onRequestWillBeSent, ... B. onRequestWillBeSent, onRequestPaused, onRequestWillBeSent, onRequestPaused, ... C. onRequestWillBeSent, onRequestPaused, onRequestPaused, onRequestWillBeSent, ... D. onRequestPaused, onRequestWillBeSent, onRequestPaused, onRequestWillBeSent, onRequestPaused, onRequestWillBeSent, onRequestPaused, onRequestPaused, ... (see crbug.com/1196004)