Change WebURLLoaderClient::willFollowRedirect() API to return bool

WebURLLoaderImpl has been requiring clients to clear the newRequest
argument when they don't want the redirect to be followed. This is
not intuitive and required strange-looking code snippet to reset the
argument.

The method should just return a bool to indicate whether or not to
follow the redirect.

Changed ResourceLoader::willFollowRedirect() to return false when
m_fetcher->willFollowRedirect() returns false. As didFail() clears
m_loader, it should be safe and it's more natural that the case
returns false.

ResourceFetcher::willFollowRedirect() may change the URL of newRequest
and return true because FrameFetchContext::dispatchWillSendRequest()
calls prepareRequest() which calls
FrameLoaderClient::dispatchWillSendRequest() which calls
WebFrameClient::willSendRequest() whose implementations may change the
URL. RenderFrameImpl::willSendRequest() and
WebFrameTestClient::willSendRequest() are the implementations. This CL
leaves the interface unchanged though it should also be fixed.

R=japhet@chromium.org,mkwst@chromium.org,bbudge@chromium.org,jochen@chromium.org,dalecurtis@chromium.org
BUG=636297

Review-Url: https://codereview.chromium.org/2230173002
Cr-Commit-Position: refs/heads/master@{#423102}
28 files changed