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

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

Issue 1866433002: Use RequestContext to apply CSP in FrameFetchContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename redirectReceivedAndNotFollowed() to redirectBlocked() Created 4 years, 8 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/ResourceLoader.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
index 38bba9600b1976ea731eace7bf934ba86e5c3c1f..87fbf79e39a24594ab398168acaaeefc982f2e98 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
@@ -215,10 +215,12 @@ void ResourceLoader::willFollowRedirect(WebURLLoader*, WebURLRequest& passedNewR
const ResourceResponse& redirectResponse(passedRedirectResponse.toResourceResponse());
newRequest.setFollowedRedirect(true);
- if (m_fetcher->willFollowRedirect(m_resource.get(), newRequest, redirectResponse))
+ if (m_fetcher->willFollowRedirect(m_resource.get(), newRequest, redirectResponse)) {
m_resource->willFollowRedirect(newRequest, redirectResponse);
- else
+ } else {
+ m_resource->willNotFollowRedirect();
cancel(ResourceError::cancelledDueToAccessCheckError(newRequest.url()));
+ }
}
void ResourceLoader::didReceiveCachedMetadata(WebURLLoader*, const char* data, int length)
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698