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

Unified Diff: third_party/WebKit/Source/core/fetch/FetchContext.h

Issue 2551893002: Upgrade-Insecure-Requests: Split CSP checks into pre-upgrade and post-upgrade.
Patch Set: Created 4 years 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/FetchContext.h
diff --git a/third_party/WebKit/Source/core/fetch/FetchContext.h b/third_party/WebKit/Source/core/fetch/FetchContext.h
index ebd4f5a6bc918b393f4853f906f23c3d604df5cf..45cd4c560fc427c988b2c9511f9fc70efed7d094 100644
--- a/third_party/WebKit/Source/core/fetch/FetchContext.h
+++ b/third_party/WebKit/Source/core/fetch/FetchContext.h
@@ -37,6 +37,7 @@
#include "core/fetch/FetchRequest.h"
#include "core/fetch/Resource.h"
#include "platform/heap/Handle.h"
+#include "platform/network/ContentSecurityPolicyParsers.h"
#include "platform/network/ResourceLoadPriority.h"
#include "wtf/Noncopyable.h"
@@ -123,6 +124,15 @@ class CORE_EXPORT FetchContext
virtual void addResourceTiming(const ResourceTimingInfo&);
virtual bool allowImage(bool, const KURL&) const { return false; }
+ virtual ResourceRequestBlockedReason checkCSPForRequest(
+ const ResourceRequest&,
+ const KURL&,
+ const ResourceLoaderOptions&,
+ bool forPreload,
+ ResourceRequest::RedirectStatus,
+ ContentSecurityPolicyHeaderType) const {
+ return ResourceRequestBlockedReasonCSP;
+ }
virtual bool canRequest(Resource::Type,
const ResourceRequest&,
const KURL&,

Powered by Google App Engine
This is Rietveld 408576698