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

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: 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/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 2168cd7e16a47183488536ebdd8f5a8a6384d1c2..f7c1416c8c706b7397b6a43a9b77ce0136663766 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -305,9 +305,9 @@ void DocumentLoader::finishedLoading(double finishTime) {
clearMainResourceHandle();
}
-void DocumentLoader::redirectReceived(
+bool DocumentLoader::redirectReceived(
Resource* resource,
- ResourceRequest& request,
+ const ResourceRequest& request,
const ResourceResponse& redirectResponse) {
DCHECK_EQ(resource, m_mainResource);
DCHECK(!redirectResponse.isNull());
@@ -321,20 +321,22 @@ void DocumentLoader::redirectReceived(
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