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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.h

Issue 2790693002: Split CSP into pre- and post-upgrade checks (Closed)
Patch Set: revert accidental AbstractWorker change Created 3 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/loader/FrameFetchContext.h
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.h b/third_party/WebKit/Source/core/loader/FrameFetchContext.h
index 05a6e6df8108c6202ef85df838ddf54262a81a19..e377ee401ec039a8ce579e14767c01c9895c9754 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.h
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.h
@@ -38,6 +38,7 @@
#include "platform/loader/fetch/FetchParameters.h"
#include "platform/loader/fetch/ResourceFetcher.h"
#include "platform/loader/fetch/ResourceRequest.h"
+#include "platform/network/ContentSecurityPolicyParsers.h"
#include "platform/wtf/Forward.h"
namespace blink {
@@ -129,6 +130,13 @@ class CORE_EXPORT FrameFetchContext final : public FetchContext {
const ResourceLoaderOptions&,
SecurityViolationReportingPolicy,
FetchParameters::OriginRestriction) const override;
+ ResourceRequestBlockedReason CanFollowRedirect(
+ Resource::Type,
+ const ResourceRequest&,
+ const KURL&,
+ const ResourceLoaderOptions&,
+ SecurityViolationReportingPolicy,
+ FetchParameters::OriginRestriction) const override;
ResourceRequestBlockedReason AllowResponse(
Resource::Type,
const ResourceRequest&,
@@ -148,9 +156,12 @@ class CORE_EXPORT FrameFetchContext final : public FetchContext {
LogMessageType = kLogErrorMessage) const override;
SecurityOrigin* GetSecurityOrigin() const override;
- void PopulateResourceRequest(Resource::Type,
+ void PopulateResourceRequest(const KURL&,
+ Resource::Type,
const ClientHintsPreferences&,
const FetchParameters::ResourceWidth&,
+ const ResourceLoaderOptions&,
+ SecurityViolationReportingPolicy,
ResourceRequest&) override;
void SetFirstPartyCookieAndRequestorOrigin(ResourceRequest&) override;
@@ -197,6 +208,14 @@ class CORE_EXPORT FrameFetchContext final : public FetchContext {
void AddCSPHeaderIfNecessary(Resource::Type, ResourceRequest&);
+ ResourceRequestBlockedReason CheckCSPForRequest(
+ const ResourceRequest&,
+ const KURL&,
+ const ResourceLoaderOptions&,
+ SecurityViolationReportingPolicy,
+ ResourceRequest::RedirectStatus,
+ ContentSecurityPolicy::CheckHeaderType) const;
+
// FIXME: Oilpan: Ideally this should just be a traced Member but that will
// currently leak because ComputedStyle and its data are not on the heap.
// See crbug.com/383860 for details.

Powered by Google App Engine
This is Rietveld 408576698