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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2230173002: Change WebURLLoaderClient::willFollowRedirect() API to return bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed jochen's point Created 4 years, 3 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/core/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index b78888927b7e4e32fbf65f20c453d3e5a5db2026..c5a999178af7f2153bfe87b93731dde3095f7353 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -315,7 +315,7 @@ void DocumentLoader::finishedLoading(double finishTime)
clearMainResourceHandle();
}
-void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse)
+bool DocumentLoader::redirectReceived(Resource* resource, const ResourceRequest& request, const ResourceResponse& redirectResponse)
{
DCHECK_EQ(resource, m_mainResource);
DCHECK(!redirectResponse.isNull());
@@ -328,17 +328,19 @@ void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque
if (!redirectingOrigin->canDisplay(requestURL)) {
FrameLoader::reportLocalLoadFailed(m_frame, requestURL.getString());
m_fetcher->stopFetching();
- return;
+ return false;
}
if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteData(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurrentTab, replacesCurrentHistoryItem(), isClientRedirect(), nullptr)) {
m_fetcher->stopFetching();
- return;
+ return false;
}
DCHECK(timing().fetchStart());
appendRedirect(requestURL);
didRedirect(redirectResponse.url(), requestURL);
frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad();
+
+ return true;
}
static bool canShowMIMEType(const String& mimeType, LocalFrame* frame)

Powered by Google App Engine
This is Rietveld 408576698