Commit 70053c3a authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Eliminate DeprecatedLower in ResourceResponse::HttpContentType()

This patch changes ResourceResponse::HttpContentType() to use
LowerASCII instead of DeprecatedLower.

DeprecatedLower has partial Unicode conversions, such as
converting U+212A to 'k', but lowering only ASCII should be
sufficient for most web platform usages.

For MIME type, [parse a MIME type] uses [ASCII lowercase].

Currently, there are 6 usages of AtomicString::DeprecatedLower
and 37 usages of String::DeprecatedLower. This patch reduces
one of the 6 usages.

[ASCII lowercase]: https://infra.spec.whatwg.org/#ascii-lowercase
[parse a MIME type]: https://mimesniff.spec.whatwg.org/#parse-a-mime-type

Bug: 627682
Change-Id: I9f44fbe1583618c3f1250af8e417dedf6cd41563
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1720994
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682127}
parent bc00c77c
...@@ -376,7 +376,7 @@ bool ResourceResponse::IsAttachment() const { ...@@ -376,7 +376,7 @@ bool ResourceResponse::IsAttachment() const {
AtomicString ResourceResponse::HttpContentType() const { AtomicString ResourceResponse::HttpContentType() const {
return ExtractMIMETypeFromMediaType( return ExtractMIMETypeFromMediaType(
HttpHeaderField(http_names::kContentType).DeprecatedLower()); HttpHeaderField(http_names::kContentType).LowerASCII());
} }
bool ResourceResponse::WasCached() const { bool ResourceResponse::WasCached() const {
......
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