Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: third_party/WebKit/Source/web/AssociatedURLLoader.cpp

Issue 2230173002: Change WebURLLoaderClient::willFollowRedirect() API to return bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/AssociatedURLLoader.cpp
diff --git a/third_party/WebKit/Source/web/AssociatedURLLoader.cpp b/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
index 9fd17b8d6ab1f7ce2a133bb93ab708ac3a25457c..3e3c52e7884bd257800d269fa1942aec36fe88a6 100644
--- a/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
+++ b/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
@@ -105,9 +105,10 @@ class AssociatedURLLoader::ClientAdapter final
double /*finishTime*/) override;
void didFail(const ResourceError&) override;
void didFailRedirectCheck() override;
+
// DocumentThreadableLoaderClient
- void willFollowRedirect(
- ResourceRequest& /*newRequest*/,
+ bool willFollowRedirect(
+ const ResourceRequest& /*newRequest*/,
const ResourceResponse& /*redirectResponse*/) override;
// Sets an error to be reported back to the client, asychronously.
@@ -164,16 +165,16 @@ AssociatedURLLoader::ClientAdapter::ClientAdapter(
DCHECK(m_client);
}
-void AssociatedURLLoader::ClientAdapter::willFollowRedirect(
- ResourceRequest& newRequest,
+bool AssociatedURLLoader::ClientAdapter::willFollowRedirect(
+ const ResourceRequest& newRequest,
const ResourceResponse& redirectResponse) {
if (!m_client)
- return;
+ return true;
WrappedResourceRequest wrappedNewRequest(newRequest);
WrappedResourceResponse wrappedRedirectResponse(redirectResponse);
- m_client->willFollowRedirect(m_loader, wrappedNewRequest,
- wrappedRedirectResponse);
+ return m_client->willFollowRedirect(m_loader, wrappedNewRequest,
+ wrappedRedirectResponse);
}
void AssociatedURLLoader::ClientAdapter::didSendData(

Powered by Google App Engine
This is Rietveld 408576698