[omnibox]: Remove NOTREACHED() which isn't relevant to Brave (#33582)

This commit is contained in:
Jay Harris
2026-02-04 08:23:36 +13:00
committed by GitHub
parent 781b5787f5
commit c29f1247b7
2 changed files with 18 additions and 0 deletions
@@ -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 <chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc>
#undef BRAVE_AUTOCOMPLETE_ICON_TO_RESOURCE_NAME_OVERRIDE
#undef set_prefer_keyword
#undef set_allow_exact_keyword_match
#undef kProductChromeRefreshIcon
@@ -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 << "'";