Simplify FetchManager's CORS preflight flag related logic
The logic to determine whether the CORS-preflight fetch is needed for the given request is duplicated in FetchManager and DocumentThreadableLoader. Remove one in FetchManager. This is safe because: - One in FetchManager::Loader::Start() sets the CORS preflight flag for the forbidden header names while one in DocumentThreadableLoader doesn't. - But since all the headers with a forbidden header name are removed by the Headers guard, FetchManager::Loader::Start() never encounter any header with a forbidden header name. Due to Request::Create() on the given |input| in GlobalFetch::Fetch(), UnsafeRequestFlag() is always true in FetchManager::Loader::Start(). So, this in the condition had no effect. Remove it. Bug: 727596 Change-Id: I7f2ddd49b619db067f68128227c7bb42ba16cd23 Reviewed-on: https://chromium-review.googlesource.com/553097 Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org> Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#490750}
Showing
Please register or sign in to comment