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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2068443002: Revert of Move 'frame-src' CSP checks into FrameFetchContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: run revert on local machine to resolve conflicts Created 4 years, 6 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 b238477105003a682e4f1cb4b27883b6aa3125cc..8f11b8e5c465dad5957fa827936b7f65e98d328d 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -314,7 +314,7 @@ void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque
m_fetcher->stopFetching();
return;
}
- if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteData(), this, m_navigationType, NavigationPolicyCurrentTab, replacesCurrentHistoryItem(), isClientRedirect())) {
+ if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteData(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurrentTab, replacesCurrentHistoryItem(), isClientRedirect())) {
m_fetcher->stopFetching();
return;
}
@@ -614,14 +614,7 @@ bool DocumentLoader::maybeLoadEmpty()
return true;
}
-void DocumentLoader::loadUnique()
-{
- m_request = ResourceRequest(SecurityOrigin::urlWithUniqueSecurityOrigin());
- m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, String());
- finishedLoading(monotonicallyIncreasingTime());
-}
-
-void DocumentLoader::startLoadingMainResource(ContentSecurityPolicyDisposition cspDisposition)
+void DocumentLoader::startLoadingMainResource()
{
timing().markNavigationStart();
ASSERT(!m_mainResource);
@@ -638,15 +631,10 @@ void DocumentLoader::startLoadingMainResource(ContentSecurityPolicyDisposition c
DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions,
(DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, CheckContentSecurityPolicy, DocumentContext));
FetchRequest fetchRequest(m_request, FetchInitiatorTypeNames::document, mainResourceLoadOptions);
- fetchRequest.setContentSecurityCheck(cspDisposition);
-
m_mainResource = RawResource::fetchMainResource(fetchRequest, fetcher(), m_substituteData);
if (!m_mainResource) {
- // If we block a main resource request, ensure that the resulting frame's
- // origin is unique, and that the redirect list is up-to-date with the
- // resource we actually commit:
- loadUnique();
- appendRedirect(SecurityOrigin::urlWithUniqueSecurityOrigin());
+ m_request = ResourceRequest(blankURL());
+ maybeLoadEmpty();
return;
}
// A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those.
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.h ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698