[cr139] TS Url type being rolled out

This has affected two places where the expected type was a string.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c60e55dfb3e30c4be420cd4fe980a928b8baf727

commit c60e55dfb3e30c4be420cd4fe980a928b8baf727
Author: Alex Chen <alexwchen@chromium.org>
Date:   Tue Jun 10 11:19:33 2025 -0700

    [realbox] Use URL type over string for icon_url

    icon_url was added in https://crrev.com/c/6618446 as a string type to
    simplify the merge process. Per feedback from security reviewers,
    icon_url is changed to a URL type in this change. No icon_url behavior
    is changed with this CL.

    Screenshot: https://screenshot.googleplex.com/9CsWvExsYWkPBKW

    Bug: 422559532
    Change-Id: Ibc7ee8424c5783ca364985208d1645597ae0e949
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6630483
    Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
    Commit-Queue: Alex Chen <alexwchen@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1471949}
This commit is contained in:
Claudio DeSouza
2025-07-16 13:38:31 -04:00
committed by Max Karolinskiy
parent 1aa1d83cc2
commit 946f5929b4
2 changed files with 2 additions and 2 deletions
@@ -30,7 +30,7 @@ function MatchImage(props: { match: AutocompleteMatch }) {
return <Icon name='product-brave-leo' className='brave-leo-icon' />
}
if (!imageUrl) {
return <img className='icon' src={iconUrl || placeholderImageSrc} />
return <img className='icon' src={iconUrl.url || placeholderImageSrc} />
}
if (imageUrl.startsWith('chrome:')) {
return <img src={imageUrl} />
@@ -110,7 +110,7 @@ function Image({ match, isAskLeo }: { match: AutocompleteMatch, isAskLeo: boolea
// url machinery.
const isGeneric = !match.imageUrl
return isGeneric
? <SearchIcon url={match.iconUrl} />
? <SearchIcon url={match.iconUrl.url} />
: match.imageUrl.startsWith('chrome')
? <FavIcon url={match.imageUrl} />
: <MaybeImage src={match.imageUrl} />