url: Introduce UriComponentEncoder [chromium/src : main]

0 views
Skip to first unread message

Kent Tamura (Gerrit)

unread,
Feb 19, 2026, 7:59:57 PM (14 hours ago) Feb 19
to Kent Tamura, Hayato Ito, Chromium LUCI CQ, chromium...@chromium.org, andysjl...@chromium.org, blink-...@chromium.org, druber...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@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 2 (Latest):
Kent Tamura . resolved

hayato@, would you review this please?
Please set Owners-Override aa 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: I4dd9c1fef5ebaa7bfe7abc37ebb139460db3aada
Gerrit-Change-Number: 7594914
Gerrit-PatchSet: 2
Gerrit-Owner: Kent Tamura <tk...@chromium.org>
Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Attention: Hayato Ito <hay...@chromium.org>
Gerrit-Comment-Date: Fri, 20 Feb 2026 00:59:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Hayato Ito (Gerrit)

unread,
Feb 19, 2026, 9:25:07 PM (13 hours ago) Feb 19
to Kent Tamura, Chromium LUCI CQ, chromium...@chromium.org, andysjl...@chromium.org, blink-...@chromium.org, druber...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
Attention needed from Kent Tamura

Hayato Ito voted and added 1 comment

Votes added by Hayato Ito

Code-Review+1
Commit-Queue+2
Owners-Override+1

1 comment

Patchset-level comments
Hayato Ito . resolved

lgtm. Nice simplification!

Open in Gerrit

Related details

Attention is currently required from:
  • Kent Tamura
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: I4dd9c1fef5ebaa7bfe7abc37ebb139460db3aada
Gerrit-Change-Number: 7594914
Gerrit-PatchSet: 2
Gerrit-Owner: Kent Tamura <tk...@chromium.org>
Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Attention: Kent Tamura <tk...@chromium.org>
Gerrit-Comment-Date: Fri, 20 Feb 2026 02:24:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Feb 19, 2026, 9:27:53 PM (13 hours ago) Feb 19
to Kent Tamura, Hayato Ito, chromium...@chromium.org, andysjl...@chromium.org, blink-...@chromium.org, druber...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
url: Introduce UriComponentEncoder

The common pattern for URI-encoding a component while trying to avoid
heap allocation was to use `url::EncodeURIComponent` with a
`url::RawCanonOutputT` buffer. This pattern is verbose, requiring
several lines of setup for a conceptually simple operation.

This change introduces `url::UriComponentEncoder`, a helper class that
encapsulates this logic. It performs the encoding in its constructor,
using a stack-allocated buffer to prevent heap allocation for strings
that fit. The result is available via a `view()` method.

This makes the calling code significantly cleaner and more readable,
often turning three or four lines of code into a single expression.

This CL should have no behavior changes.
Change-Id: I4dd9c1fef5ebaa7bfe7abc37ebb139460db3aada
Reviewed-by: Hayato Ito <hay...@chromium.org>
Auto-Submit: Kent Tamura <tk...@chromium.org>
Commit-Queue: Hayato Ito <hay...@chromium.org>
Owners-Override: Hayato Ito <hay...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1587578}
Files:
  • M chrome/browser/loader/keep_alive_request_browsertest_util.cc
  • M chrome/browser/safe_browsing/chrome_password_protection_service.cc
  • M chrome/browser/ssl/ssl_browsertest.cc
  • M chrome/browser/ui/webui/new_tab_page/action_chips/remote_suggestions_service_simple_unittest.cc
  • M chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
  • M chrome/browser/ui/webui/sanitized_image_source_unittest.cc
  • M components/signin/internal/identity_manager/gaia_cookie_manager_service.cc
  • M third_party/blink/renderer/platform/weborigin/kurl.cc
  • M url/url_util.cc
  • M url/url_util.h
Change size: M
Delta: 10 files changed, 58 insertions(+), 51 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: I4dd9c1fef5ebaa7bfe7abc37ebb139460db3aada
Gerrit-Change-Number: 7594914
Gerrit-PatchSet: 3
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