OOR-CORS: OnComplete can be called while handling redirects

Current code expects OnComplete should not be called while handling
redirects. But if an underlayout URLLoader request fails for some
reasons, it results in OnComplete with an error status, e.g. net::ERR_FAILED.

Also this fixes following tests for OutOfBlinkCors.
 - ExtensionWebRequestApiTest.WebRequestSubresourceRedirectsWithExtraHeaders
 - ExtensionWebRequestApiTest.WebRequestRedirectsWithExtraHeaders

Bug: 934571
Change-Id: I0817c51b66e4cb81e1740ceedb64795c1dba25cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1482282
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637620}
2 files changed