From 946f5929b42b0e8458a790efeaae7b2b4deb6f15 Mon Sep 17 00:00:00 2001 From: Claudio DeSouza Date: Wed, 11 Jun 2025 16:57:30 +0100 Subject: [PATCH] [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 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 Reviewed-by: Justin Donnelly Commit-Queue: Alex Chen Cr-Commit-Position: refs/heads/main@{#1471949} --- .../components/search/search_results.tsx | 2 +- components/brave_new_tab_ui/components/search/SearchResult.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/resources/brave_new_tab_page_refresh/components/search/search_results.tsx b/browser/resources/brave_new_tab_page_refresh/components/search/search_results.tsx index 0ef1c4685c6..fe0c946f42a 100644 --- a/browser/resources/brave_new_tab_page_refresh/components/search/search_results.tsx +++ b/browser/resources/brave_new_tab_page_refresh/components/search/search_results.tsx @@ -30,7 +30,7 @@ function MatchImage(props: { match: AutocompleteMatch }) { return } if (!imageUrl) { - return + return } if (imageUrl.startsWith('chrome:')) { return diff --git a/components/brave_new_tab_ui/components/search/SearchResult.tsx b/components/brave_new_tab_ui/components/search/SearchResult.tsx index 2c467bfbd85..e3a325929e9 100644 --- a/components/brave_new_tab_ui/components/search/SearchResult.tsx +++ b/components/brave_new_tab_ui/components/search/SearchResult.tsx @@ -110,7 +110,7 @@ function Image({ match, isAskLeo }: { match: AutocompleteMatch, isAskLeo: boolea // url machinery. const isGeneric = !match.imageUrl return isGeneric - ? + ? : match.imageUrl.startsWith('chrome') ? :