• Makoto Shimazu's avatar
    ServiceWorkerImportedScriptUpdateCheck uses throttles on the browser · f47a94c5
    Makoto Shimazu authored
    Previously it doesn't care about the throttles, but it means the update requests
    will be missed from the embedder. This CL is to use ThrottlingURLLoader in
    ServiceWorkerSingleScriptUpdateChecker, and also this makes
    ServiceWorkerNewScriptLoader be able to inherit the throttling loader if it's
    resuming a cache writer.
    
    Now throttles work only on the UI thread, so this CL introduces a thin wrapper to
    invoke method calls on the UI thread.
    
    After this CL lands, I'm going to add code to send the paused state to the
    renderer as a resource override so that the renderer doesn't create
    ThrottlingURLLoader for the request which is already using ThrottlingURLLoader
    in the browser process.
    
    Bug: 988957
    Change-Id: I32e19d3cd7071dddc056ffdab2bfad36679d5b0f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728889
    Auto-Submit: Makoto Shimazu <shimazu@chromium.org>
    Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
    Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
    Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
    Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#686419}
    f47a94c5
throttling_url_loader.cc 30 KB