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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/FetchContext.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/platform/loader/fetch/FetchContext.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
index 8fd471cdb7d132b03cbe5532b3d3ea545d649752..92205d2625b057f20fd1c6583182b1e36e201dce 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
@@ -38,6 +38,7 @@
#include "platform/loader/fetch/Resource.h"
#include "platform/loader/fetch/ResourceLoadPriority.h"
#include "platform/loader/fetch/ResourceRequest.h"
+#include "platform/network/ContentSecurityPolicyParsers.h"
#include "platform/weborigin/SecurityViolationReportingPolicy.h"
#include "platform/wtf/Forward.h"
#include "platform/wtf/Noncopyable.h"
@@ -154,6 +155,15 @@ class PLATFORM_EXPORT FetchContext
FetchParameters::OriginRestriction) const {
return ResourceRequestBlockedReason::kOther;
}
+ virtual ResourceRequestBlockedReason CanFollowRedirect(
+ Resource::Type,
+ const ResourceRequest&,
+ const KURL&,
+ const ResourceLoaderOptions&,
+ SecurityViolationReportingPolicy,
+ FetchParameters::OriginRestriction) const {
+ return ResourceRequestBlockedReason::kOther;
+ }
virtual ResourceRequestBlockedReason AllowResponse(
Resource::Type,
const ResourceRequest&,
@@ -180,9 +190,12 @@ class PLATFORM_EXPORT FetchContext
// Populates the ResourceRequest using the given values and information
// stored in the FetchContext implementation. Used by ResourceFetcher to
// prepare a ResourceRequest instance at the start of resource loading.
- virtual void PopulateResourceRequest(Resource::Type,
+ virtual void PopulateResourceRequest(const KURL&,
+ Resource::Type,
const ClientHintsPreferences&,
const FetchParameters::ResourceWidth&,
+ const ResourceLoaderOptions&,
+ SecurityViolationReportingPolicy,
ResourceRequest&);
// Sets the first party for cookies and requestor origin using information
// stored in the FetchContext implementation.

Powered by Google App Engine
This is Rietveld 408576698