url: Introduce UrlEscapeDecoder to simplify URL decoding [chromium/src : main]

1 view
Skip to first unread message

Kent Tamura (Gerrit)

unread,
Feb 25, 2026, 7:07:58 PM (6 days ago) Feb 25
to Kent Tamura, Hayato Ito, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Mathias Bynens, antoniosarto...@chromium.org, arthursonzog...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org, mkwst+w...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Hayato Ito

Kent Tamura voted and added 1 comment

Votes added by Kent Tamura

Auto-Submit+1
Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Kent Tamura . resolved

hayato@, would you review this please?
Please set Owners-Override as well.

Open in Gerrit

Related details

Attention is currently required from:
  • Hayato Ito
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7b3c1538136b537ac33d6f101ca0e011308cc974
Gerrit-Change-Number: 7610180
Gerrit-PatchSet: 4
Gerrit-Owner: Kent Tamura <tk...@chromium.org>
Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-CC: Mathias Bynens <mat...@chromium.org>
Gerrit-Attention: Hayato Ito <hay...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Feb 2026 00:07:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Hayato Ito (Gerrit)

unread,
Feb 25, 2026, 9:03:16 PM (6 days ago) Feb 25
to Kent Tamura, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Mathias Bynens, antoniosarto...@chromium.org, arthursonzog...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org, mkwst+w...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Kent Tamura

Hayato Ito voted and added 2 comments

Votes added by Hayato Ito

Code-Review+1
Owners-Override+1

2 comments

Patchset-level comments
Hayato Ito . resolved

lgtm % nits

File url/url_util.h
Line 300, Patchset 4 (Latest):// FunctionAcceptsStringView(url::UrlEscapeDeoder(input, mode).view());
Hayato Ito . unresolved

nit; typo Deoder

Open in Gerrit

Related details

Attention is currently required from:
  • Kent Tamura
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7b3c1538136b537ac33d6f101ca0e011308cc974
Gerrit-Change-Number: 7610180
Gerrit-PatchSet: 4
Gerrit-Owner: Kent Tamura <tk...@chromium.org>
Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-CC: Mathias Bynens <mat...@chromium.org>
Gerrit-Attention: Kent Tamura <tk...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Feb 2026 02:02:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Kent Tamura (Gerrit)

unread,
Feb 26, 2026, 12:48:37 AM (5 days ago) Feb 26
to Kent Tamura, Hayato Ito, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Mathias Bynens, antoniosarto...@chromium.org, arthursonzog...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org, mkwst+w...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org

Kent Tamura voted and added 1 comment

Votes added by Kent Tamura

Auto-Submit+1
Commit-Queue+2

1 comment

File url/url_util.h
Line 300, Patchset 4:// FunctionAcceptsStringView(url::UrlEscapeDeoder(input, mode).view());
Hayato Ito . resolved

nit; typo Deoder

Kent Tamura

Thanks! Done.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7b3c1538136b537ac33d6f101ca0e011308cc974
    Gerrit-Change-Number: 7610180
    Gerrit-PatchSet: 5
    Gerrit-Owner: Kent Tamura <tk...@chromium.org>
    Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
    Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
    Gerrit-CC: Mathias Bynens <mat...@chromium.org>
    Gerrit-Comment-Date: Thu, 26 Feb 2026 05:48:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Hayato Ito <hay...@chromium.org>
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Feb 26, 2026, 1:50:37 AM (5 days ago) Feb 26
    to Kent Tamura, Hayato Ito, AyeAye, chromium...@chromium.org, Mathias Bynens, antoniosarto...@chromium.org, arthursonzog...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org, mkwst+w...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org

    Chromium LUCI CQ submitted the change with unreviewed changes

    Unreviewed changes

    4 is the latest approved patch-set.
    The change was submitted with unreviewed changes in the following files:

    ```
    The name of the file: url/url_util.h
    Insertions: 1, Deletions: 1.

    @@ -297,7 +297,7 @@
    // url::UrlEscapeDecoder decoder(input, mode);
    // FunctionAcceptsStringView(decoder.view());
    //
    -// FunctionAcceptsStringView(url::UrlEscapeDeoder(input, mode).view());
    +// FunctionAcceptsStringView(url::UrlEscapeDecoder(input, mode).view());
    //
    // The following code doesn't work because the view() result can't outlive the
    // UrlEscapeDecoder instance.
    ```

    Change information

    Commit message:
    url: Introduce UrlEscapeDecoder to simplify URL decoding

    This change introduces url::UrlEscapeDecoder, a helper class that
    simplifies the process of decoding URL escape sequences.

    Previously, decoding required manually setting up a RawCanonOutputW
    buffer and then calling DecodeUrlEscapeSequences(). This pattern was
    verbose.

    The new UrlEscapeDecoder encapsulates this logic. It performs the
    decoding in its constructor. This makes the calling code more concise
    and readable:

    url::UrlEscapeDecoder decoder(input, mode);
    ... use decoder.view() ...

    This CL refactors several existing call sites to use the new, simpler
    pattern.
    Change-Id: I7b3c1538136b537ac33d6f101ca0e011308cc974
    Commit-Queue: Kent Tamura <tk...@chromium.org>
    Owners-Override: Hayato Ito <hay...@chromium.org>
    Auto-Submit: Kent Tamura <tk...@chromium.org>
    Reviewed-by: Hayato Ito <hay...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1590661}
    Files:
    • M chrome/browser/ui/webui/new_tab_page/untrusted_source.cc
    • M chrome/browser/ui/webui/sanitized_image_source.cc
    • M chrome/test/chromedriver/server/http_handler.cc
    • M net/third_party/quiche/overrides/quiche_platform_impl/quiche_url_utils_impl.cc
    • M services/network/public/cpp/content_security_policy/csp_source.cc
    • M third_party/blink/renderer/platform/weborigin/kurl.cc
    • M url/url_util.h
    Change size: M
    Delta: 7 files changed, 47 insertions(+), 21 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Hayato Ito
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7b3c1538136b537ac33d6f101ca0e011308cc974
    Gerrit-Change-Number: 7610180
    Gerrit-PatchSet: 6
    Gerrit-Owner: Kent Tamura <tk...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
    Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages