Simplify OriginTrialContext initialization and its interaction with FeaturePolicyParser
* Move OriginTrialContext from SecurityContext to ExecutionContext, since it is unused for RemoteSecurityContexts. * Construct the OriginTrialContext directly in the ExecutionContext constructor, rather than requiring subclasses to do later. This requires removing one of the constructor variants that is only used for testing, so add SetTrialTokenValidatorForTesting() to OriginTrialContext for that test. * SecurityContextInit is a FeaturePolicyParserDelegate. This is because it needs to provide access to the OriginTrialContext during FeaturePolicy calculation, because the ExecutionContext's OriginTrialContext was not set up when the FeaturePolicy was calculated. Now it is. Remove all of the plumbing related to SecurityContextInit being a FeaturePolicyParserDelegate, and pass SecurityContextInit::execution_context_ where needed instead. * This means ExecutionContext is the sole FeaturePolicyParserDelegate. Have FeaturePolicyParser reference the ExecutionContext directly and remove the FeaturePolicyParserDelegate layer. Change-Id: If57297f1bfefc72a5378dd55e6adc52d80ce8461 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293475 Commit-Queue: Nate Chapin <japhet@chromium.org> Auto-Submit: Nate Chapin <japhet@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#788665}
Showing
Please register or sign in to comment