From c61bc401fa4b532de7bf0ff19e52e75fa3de5206 Mon Sep 17 00:00:00 2001 From: mkarolin Date: Mon, 27 Apr 2020 18:29:23 -0400 Subject: [PATCH] Fixes New Tab page title l10n. Fixes brave/brave-browser#9169 Added title override like Chromium's NewTabUI class does. --- browser/ui/webui/brave_new_tab_ui.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/browser/ui/webui/brave_new_tab_ui.cc b/browser/ui/webui/brave_new_tab_ui.cc index dfcf81e64e0c..04fcce75ca4a 100644 --- a/browser/ui/webui/brave_new_tab_ui.cc +++ b/browser/ui/webui/brave_new_tab_ui.cc @@ -15,7 +15,9 @@ #include "brave/components/brave_new_tab/resources/grit/brave_new_tab_generated_map.h" #include "chrome/browser/profiles/profile.h" #include "components/grit/brave_components_resources.h" +#include "components/strings/grit/components_strings.h" #include "content/public/browser/web_ui_data_source.h" +#include "ui/base/l10n/l10n_util.h" BraveNewTabUI::BraveNewTabUI(content::WebUI* web_ui, const std::string& name) : WebUIController(web_ui) { @@ -25,6 +27,7 @@ BraveNewTabUI::BraveNewTabUI(content::WebUI* web_ui, const std::string& name) web_ui->AddMessageHandler(base::WrapUnique( BraveNewTabMessageHandler::Create(source, profile))); content::WebUIDataSource::Add(profile, source); + web_ui->OverrideTitle(l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE)); } BraveNewTabUI::~BraveNewTabUI() {