diff --git a/chromium_src/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc b/chromium_src/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc index 91bf3cb4405..a0ee2333266 100644 --- a/chromium_src/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc +++ b/chromium_src/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc @@ -37,8 +37,14 @@ constexpr char kLeoMessageBubbleAskIconResourceName[] = autocomplete_input.set_prefer_keyword(true) #define set_allow_exact_keyword_match(allow) set_allow_exact_keyword_match(true) +// This function is used for the WebUI Omnibox which isn't enabled in Brave, so +// its okay to disable the NOTREACHED() check here and use the default icon +// instead. +#define BRAVE_AUTOCOMPLETE_ICON_TO_RESOURCE_NAME_OVERRIDE return ""; + #include +#undef BRAVE_AUTOCOMPLETE_ICON_TO_RESOURCE_NAME_OVERRIDE #undef set_prefer_keyword #undef set_allow_exact_keyword_match #undef kProductChromeRefreshIcon diff --git a/patches/chrome-browser-ui-webui-cr_components-searchbox-searchbox_handler.cc.patch b/patches/chrome-browser-ui-webui-cr_components-searchbox-searchbox_handler.cc.patch new file mode 100644 index 00000000000..7395e9f3743 --- /dev/null +++ b/patches/chrome-browser-ui-webui-cr_components-searchbox-searchbox_handler.cc.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc b/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc +index ef24aeedc3dea2f31e49c5b87f10723be0195220..76d2641c42d4250c681eadcefc46eff4459c5a23 100644 +--- a/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc ++++ b/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc +@@ -568,6 +568,7 @@ std::string SearchboxHandler::AutocompleteIconToResourceName( + // TODO(446953331): It's error-prone to keep the above if's up to date. When + // omnibox input and popup views are replaced with webUI, matches and + // actions can store an icon enum instead of `VectorIcon`. ++ BRAVE_AUTOCOMPLETE_ICON_TO_RESOURCE_NAME_OVERRIDE + NOTREACHED() << "Every autocomplete icon must have an equivalent SVG " + "resource for the NTP Realbox. icon.name: '" + << icon.name << "'";