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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2230173002: Change WebURLLoaderClient::willFollowRedirect() API to return bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed #38 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/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 5ff0d0d3861a31c60532f733a76016d704734229..19870a91f55ea1db4241e20771a63a3beca47d47 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -1096,6 +1096,7 @@ bool ResourceFetcher::willFollowRedirect(Resource* resource, ResourceRequest& ne
if (!isManualRedirectFetchRequest(resource->resourceRequest())) {
if (!context().canRequest(resource->getType(), newRequest, newRequest.url(), resource->options(), resource->isUnusedPreload(), FetchRequest::UseDefaultOriginRestrictionForType))
return false;
+
Nate Chapin 2016/09/14 22:25:27 This file only has whitespace changes?
tyoshino (SeeGerritForStatus) 2016/09/16 07:19:58 Oh, right. Reverted.
if (resource->options().corsEnabled == IsCORSEnabled) {
RefPtr<SecurityOrigin> sourceOrigin = resource->options().securityOrigin;
if (!sourceOrigin.get())
@@ -1109,6 +1110,7 @@ bool ResourceFetcher::willFollowRedirect(Resource* resource, ResourceRequest& ne
return false;
}
}
+
if (resource->getType() == Resource::Image && shouldDeferImageLoad(newRequest.url()))
return false;
}
@@ -1120,8 +1122,11 @@ bool ResourceFetcher::willFollowRedirect(Resource* resource, ResourceRequest& ne
bool crossOrigin = !redirectedSecurityOrigin->isSameSchemeHostPort(originalSecurityOrigin.get());
it->value->addRedirect(redirectResponse, encodedDataLength, crossOrigin);
}
+
newRequest.setAllowStoredCredentials(resource->options().allowCredentials == AllowStoredCredentials);
+
willSendRequest(resource->identifier(), newRequest, redirectResponse, resource->options());
+
return true;
}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698