Commit 0c9e14d6 authored by Zhuoyu Qian's avatar Zhuoyu Qian Committed by Commit Bot

Rename |world| to |world_for_csp|

This CL rename ResourceLoaderOptions member |world| to |world_for_csp|.

BUG=896041

Change-Id: Icaff36c438cbcd2cad86d2825efba3967824543a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2377165Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Cr-Commit-Position: refs/heads/master@{#802120}
parent 82e2036e
......@@ -83,7 +83,7 @@ bool CSSFontFaceSrcValue::HasFailedOrCanceledSubresources() const {
FontResource& CSSFontFaceSrcValue::Fetch(ExecutionContext* context,
FontResourceClient* client) const {
if (!fetched_ || fetched_->GetResource()->Options().world != world_) {
if (!fetched_ || fetched_->GetResource()->Options().world_for_csp != world_) {
ResourceRequest resource_request(absolute_resource_);
resource_request.SetReferrerPolicy(
ReferrerUtils::MojoReferrerPolicyResolveDefault(
......
......@@ -118,7 +118,7 @@ BaseFetchContext::CheckCSPForRequestInternal(
}
const ContentSecurityPolicy* csp =
GetContentSecurityPolicyForWorld(options.world.get());
GetContentSecurityPolicyForWorld(options.world_for_csp.get());
if (csp &&
!csp->AllowRequest(request_context, request_destination, url,
options.content_security_policy_nonce,
......
......@@ -689,7 +689,7 @@ void FrameFetchContext::PopulateResourceRequest(
AddClientHintsIfNecessary(hints_preferences, resource_width, request);
const ContentSecurityPolicy* csp =
GetContentSecurityPolicyForWorld(options.world.get());
GetContentSecurityPolicyForWorld(options.world_for_csp.get());
if (csp && csp->ShouldSendCSPHeader(type))
// TODO(crbug.com/993769): Test if this header returns duplicated values
// (i.e. "CSP: active, active") on asynchronous "stale-while-revalidate"
......
......@@ -46,7 +46,7 @@ ResourceLoaderOptions::ResourceLoaderOptions(
cors_flag(false),
parser_disposition(kParserInserted),
cache_aware_loading_enabled(kNotCacheAwareLoadingEnabled),
world(std::move(world)) {}
world_for_csp(std::move(world)) {}
ResourceLoaderOptions::ResourceLoaderOptions(
const ResourceLoaderOptions& other) = default;
......
......@@ -119,8 +119,7 @@ struct PLATFORM_EXPORT ResourceLoaderOptions {
// The world in which this request initiated. This will be used for CSP checks
// if specified. If null, the CSP bound to the FetchContext is used.
// TODO(crbug.com/896041): Rename to |world_for_csp|.
scoped_refptr<const DOMWrapperWorld> world;
scoped_refptr<const DOMWrapperWorld> world_for_csp;
// If not null, this URLLoaderFactory should be used to load this resource
// rather than whatever factory the system might otherwise use.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment