Commit 0bc0f635 authored by dpapad's avatar dpapad Committed by Commit Bot

Remove obsolete browser strings include in os_settings_ui.cc.

Also removing obsolete TODO (already addressed), as well as
the unused "showOsSettings" loadTimeData boolean.

Bug: 967888
Change-Id: I36a99fae23e5369b01c9610b837866fce5a7934f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2155182Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: dpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760260}
parent 0c401714
......@@ -83,7 +83,6 @@
#include "chrome/browser/ui/webui/settings/reset_settings_handler.h"
#include "chrome/browser/ui/webui/settings/search_engines_handler.h"
#include "chrome/browser/ui/webui/settings/settings_cookies_view_handler.h"
#include "chrome/browser/ui/webui/settings/settings_localized_strings_provider.h"
#include "chrome/browser/ui/webui/settings/settings_media_devices_selection_handler.h"
#include "chrome/browser/ui/webui/settings/shared_settings_localized_strings_provider.h"
#include "chrome/browser/ui/webui/settings/tts_handler.h"
......@@ -137,10 +136,6 @@ OSSettingsUI::OSSettingsUI(content::WebUI* web_ui)
// This handler is for chrome://os-settings.
html_source->AddBoolean("isOSSettings", true);
// Needed for JS code shared between browser and OS settings (for example,
// page_visibility.js).
html_source->AddBoolean("showOSSettings", true);
html_source->AddBoolean(
"showParentalControls",
chromeos::settings::ShouldShowParentalControls(profile));
......@@ -241,9 +236,6 @@ OSSettingsUI::OSSettingsUI(content::WebUI* web_ui)
html_source->AddResourcePath("search/search.mojom-lite.js",
IDR_OS_SETTINGS_SEARCH_MOJOM_LITE_JS);
// AddOsLocalizedStrings must be added after AddBrowserLocalizedStrings
// as repeated keys used by the OS strings should override the same keys
// that may be used in the Browser string provider.
OsSettingsLocalizedStringsProviderFactory::GetForProfile(profile)
->AddOsLocalizedStrings(html_source, profile);
......
......@@ -2029,7 +2029,7 @@ void AddSecurityKeysStrings(content::WebUIDataSource* html_source) {
} // namespace
void AddBrowserLocalizedStrings(content::WebUIDataSource* html_source,
void AddLocalizedStrings(content::WebUIDataSource* html_source,
Profile* profile,
content::WebContents* web_contents) {
AddA11yStrings(html_source);
......
......@@ -17,9 +17,7 @@ namespace settings {
// Adds the strings needed by the browser settings page to |html_source|
// This function causes |html_source| to expose a strings.js file from its
// source which contains a mapping from string's name to its translated value.
// TODO(crbug/967888): This still contains OS Settings strings. Strings specific
// to OS settings should be moved to os_settings_localized_strings_provider.cc.
void AddBrowserLocalizedStrings(content::WebUIDataSource* html_source,
void AddLocalizedStrings(content::WebUIDataSource* html_source,
Profile* profile,
content::WebContents* web_contents);
......
......@@ -348,7 +348,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui)
kGeneratedPath, IDR_SETTINGS_SETTINGS_V3_HTML);
#endif
AddBrowserLocalizedStrings(html_source, profile, web_ui->GetWebContents());
AddLocalizedStrings(html_source, profile, web_ui->GetWebContents());
ManagedUIHandler::Initialize(web_ui, html_source);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment