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

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, 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 c29564fccd737f49b3a7022ed98cd0f706a2937c..7b77a1fd68554312e93635e7a2d6158de8e67c93 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -321,7 +321,7 @@ void DocumentLoader::finishedLoading(double finishTime)
clearMainResourceHandle();
}
-void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse)
+bool DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse)
{
ASSERT_UNUSED(resource, resource == m_mainResource);
ASSERT(!redirectResponse.isNull());
@@ -334,17 +334,19 @@ void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque
if (!redirectingOrigin->canDisplay(requestURL)) {
FrameLoader::reportLocalLoadFailed(m_frame, requestURL.getString());
m_fetcher->stopFetching();
- return;
+ return true;
Nate Chapin 2016/09/06 16:46:14 If you return false here, you can probably remove
tyoshino (SeeGerritForStatus) 2016/09/07 10:52:28 I agree that we can change the return value here a
Nate Chapin 2016/09/07 17:05:45 Hrm, maybe ResourceLoader::willFollowRedirect() sh
tyoshino (SeeGerritForStatus) 2016/09/14 14:53:47 Any issue with only failing this RawResource? At t
Nate Chapin 2016/09/14 22:25:27 Subresources can only be loaded once this Document
tyoshino (SeeGerritForStatus) 2016/09/16 07:19:58 OK. Removing stopFetching() calls here and at L340
}
if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteData(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurrentTab, replacesCurrentHistoryItem(), isClientRedirect())) {
m_fetcher->stopFetching();
- return;
+ return true;
}
ASSERT(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