Skip to content

Commit

Permalink
Fixes New Tab page title l10n.
Browse files Browse the repository at this point in the history
Fixes brave/brave-browser#9169

Added title override like Chromium's NewTabUI class does.
  • Loading branch information
mkarolin committed Apr 27, 2020
1 parent 7c68cfc commit c61bc40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions browser/ui/webui/brave_new_tab_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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() {
Expand Down

0 comments on commit c61bc40

Please sign in to comment.