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

Unified Diff: Source/core/loader/DocumentThreadableLoader.cpp

Issue 666533005: DocumentThreadableLoader: Rename isAllowedByPolicy() to isAllowedByContentSecurityPolicy() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/DocumentThreadableLoader.cpp
diff --git a/Source/core/loader/DocumentThreadableLoader.cpp b/Source/core/loader/DocumentThreadableLoader.cpp
index 3cdd83fde895b57f08203a6de78b8e26fdb8ef44..3f5553fd1c12e46c3cf1e911b647916c08ae54d2 100644
--- a/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/Source/core/loader/DocumentThreadableLoader.cpp
@@ -250,7 +250,7 @@ void DocumentThreadableLoader::redirectReceived(Resource* resource, ResourceRequ
return;
}
- if (!isAllowedByPolicy(request.url())) {
+ if (!isAllowedByContentSecurityPolicy(request.url())) {
m_client->didFailRedirectCheck();
request = ResourceRequest();
m_requestStartedSeconds = 0.0;
@@ -561,7 +561,7 @@ void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, Resou
// FIXME: A synchronous request does not tell us whether a redirect happened or not, so we guess by comparing the
// request and response URLs. This isn't a perfect test though, since a server can serve a redirect to the same URL that was
// requested. Also comparing the request and response URLs as strings will fail if the requestURL still has its credentials.
- if (requestURL != response.url() && (!isAllowedByPolicy(response.url()) || !isAllowedRedirect(response.url()))) {
+ if (requestURL != response.url() && (!isAllowedByContentSecurityPolicy(response.url()) || !isAllowedRedirect(response.url()))) {
m_client->didFailRedirectCheck();
return;
}
@@ -583,7 +583,7 @@ bool DocumentThreadableLoader::isAllowedRedirect(const KURL& url) const
return m_sameOriginRequest && securityOrigin()->canRequest(url);
}
-bool DocumentThreadableLoader::isAllowedByPolicy(const KURL& url) const
+bool DocumentThreadableLoader::isAllowedByContentSecurityPolicy(const KURL& url) const
{
if (m_options.contentSecurityPolicyEnforcement != EnforceConnectSrcDirective)
return true;
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698