Clean up the CORS preflight part of DocumentThreadableLoader::MakeCrossOriginAccessRequest()
The bunch of if-clauses are hard to read. Reorganize them for better readability. Unify the multiple checks on IsExternalRequest. Early return for IsExternalRequest(). Don't check CORS-safelisted-ness when either of the external request or forced preflight condition is already met. Clarify where the ServiceWorkerMode configuration is required and its reason for each place. Bug: 695808, 604084 Change-Id: I2a056afeebea4d6472e60c52cc72fd58c6bef703 Reviewed-on: https://chromium-review.googlesource.com/542676Reviewed-by:Tsuyoshi Horo <horo@chromium.org> Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org> Cr-Commit-Position: refs/heads/master@{#481846}
Showing
This diff is collapsed.
Please register or sign in to comment