Commit 62bfe755 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Remove redundant KURL <=> String conversion

ExecutionContext::CompleteURL returns a KURL, but
CSSFontFaceSrcValue::RestoreCachedResourceIfNeeded converts it to
a String and then convert it back to a KURL. Fix that.

Bug: None
Change-Id: Ibe6a2cfa8c8944df1adb628f73c37d59323d0b2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2301557Reviewed-by: default avatarDominic Farolino <dom@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789326}
parent c2bf7611
...@@ -135,12 +135,11 @@ void CSSFontFaceSrcValue::RestoreCachedResourceIfNeeded( ...@@ -135,12 +135,11 @@ void CSSFontFaceSrcValue::RestoreCachedResourceIfNeeded(
DCHECK(context); DCHECK(context);
DCHECK(context->Fetcher()); DCHECK(context->Fetcher());
const String resource_url = context->CompleteURL(absolute_resource_); const KURL url = context->CompleteURL(absolute_resource_);
DCHECK_EQ(should_check_content_security_policy_, DCHECK_EQ(should_check_content_security_policy_,
fetched_->GetResource()->Options().content_security_policy_option); fetched_->GetResource()->Options().content_security_policy_option);
context->Fetcher()->EmulateLoadStartedForInspector( context->Fetcher()->EmulateLoadStartedForInspector(
fetched_->GetResource(), KURL(resource_url), fetched_->GetResource(), url, mojom::RequestContextType::FONT,
mojom::RequestContextType::FONT,
network::mojom::RequestDestination::kFont, network::mojom::RequestDestination::kFont,
fetch_initiator_type_names::kCSS); fetch_initiator_type_names::kCSS);
} }
......
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