Commit 0ec92892 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS Settings] Un-const OsSettingsPerPageStringsProvider::AddUiStrings()

This function was const, but this required some derived classes to have
to be refactored in unintended ways. Removing to help unblock future
changes.

Bug: 1069849
Change-Id: I612b3b2cde668beca6373792c94cec2422c77583
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2155175
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760233}
parent bbd780f3
...@@ -61,7 +61,7 @@ BluetoothStringsProvider::~BluetoothStringsProvider() { ...@@ -61,7 +61,7 @@ BluetoothStringsProvider::~BluetoothStringsProvider() {
} }
void BluetoothStringsProvider::AddUiStrings( void BluetoothStringsProvider::AddUiStrings(
content::WebUIDataSource* html_source) const { content::WebUIDataSource* html_source) {
static constexpr webui::LocalizedString kLocalizedStrings[] = { static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"bluetoothConnected", IDS_SETTINGS_BLUETOOTH_CONNECTED}, {"bluetoothConnected", IDS_SETTINGS_BLUETOOTH_CONNECTED},
{"bluetoothConnectedWithBattery", {"bluetoothConnectedWithBattery",
......
...@@ -28,7 +28,7 @@ class BluetoothStringsProvider : public OsSettingsPerPageStringsProvider, ...@@ -28,7 +28,7 @@ class BluetoothStringsProvider : public OsSettingsPerPageStringsProvider,
private: private:
// OsSettingsPerPageStringsProvider: // OsSettingsPerPageStringsProvider:
void AddUiStrings(content::WebUIDataSource* html_source) const override; void AddUiStrings(content::WebUIDataSource* html_source) override;
// device::BluetoothAdapter::Observer: // device::BluetoothAdapter::Observer:
void AdapterPresentChanged(device::BluetoothAdapter* adapter, void AdapterPresentChanged(device::BluetoothAdapter* adapter,
......
...@@ -84,7 +84,7 @@ InternetStringsProvider::InternetStringsProvider(Profile* profile, ...@@ -84,7 +84,7 @@ InternetStringsProvider::InternetStringsProvider(Profile* profile,
InternetStringsProvider::~InternetStringsProvider() = default; InternetStringsProvider::~InternetStringsProvider() = default;
void InternetStringsProvider::AddUiStrings( void InternetStringsProvider::AddUiStrings(
content::WebUIDataSource* html_source) const { content::WebUIDataSource* html_source) {
static constexpr webui::LocalizedString kLocalizedStrings[] = { static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"internetAddConnection", IDS_SETTINGS_INTERNET_ADD_CONNECTION}, {"internetAddConnection", IDS_SETTINGS_INTERNET_ADD_CONNECTION},
{"internetAddConnectionExpandA11yLabel", {"internetAddConnectionExpandA11yLabel",
......
...@@ -30,7 +30,7 @@ class InternetStringsProvider ...@@ -30,7 +30,7 @@ class InternetStringsProvider
private: private:
// OsSettingsPerPageStringsProvider: // OsSettingsPerPageStringsProvider:
void AddUiStrings(content::WebUIDataSource* html_source) const override; void AddUiStrings(content::WebUIDataSource* html_source) override;
// network_config::mojom::CrosNetworkConfigObserver: // network_config::mojom::CrosNetworkConfigObserver:
void OnActiveNetworksChanged( void OnActiveNetworksChanged(
......
...@@ -85,7 +85,7 @@ MultiDeviceStringsProvider::~MultiDeviceStringsProvider() { ...@@ -85,7 +85,7 @@ MultiDeviceStringsProvider::~MultiDeviceStringsProvider() {
} }
void MultiDeviceStringsProvider::AddUiStrings( void MultiDeviceStringsProvider::AddUiStrings(
content::WebUIDataSource* html_source) const { content::WebUIDataSource* html_source) {
static constexpr webui::LocalizedString kLocalizedStrings[] = { static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"multidevicePageTitle", IDS_SETTINGS_MULTIDEVICE}, {"multidevicePageTitle", IDS_SETTINGS_MULTIDEVICE},
{"multideviceSetupButton", IDS_SETTINGS_MULTIDEVICE_SETUP_BUTTON}, {"multideviceSetupButton", IDS_SETTINGS_MULTIDEVICE_SETUP_BUTTON},
......
...@@ -30,7 +30,7 @@ class MultiDeviceStringsProvider ...@@ -30,7 +30,7 @@ class MultiDeviceStringsProvider
private: private:
// OsSettingsPerPageStringsProvider: // OsSettingsPerPageStringsProvider:
void AddUiStrings(content::WebUIDataSource* html_source) const override; void AddUiStrings(content::WebUIDataSource* html_source) override;
// multidevice_setup::MultiDeviceSetupClient::Observer: // multidevice_setup::MultiDeviceSetupClient::Observer:
void OnHostStatusChanged( void OnHostStatusChanged(
......
...@@ -52,7 +52,7 @@ class OsSettingsPerPageStringsProvider { ...@@ -52,7 +52,7 @@ class OsSettingsPerPageStringsProvider {
const OsSettingsPerPageStringsProvider& other) = delete; const OsSettingsPerPageStringsProvider& other) = delete;
// Adds strings to be displayed in the UI via loadTimeData. // Adds strings to be displayed in the UI via loadTimeData.
virtual void AddUiStrings(content::WebUIDataSource* html_source) const = 0; virtual void AddUiStrings(content::WebUIDataSource* html_source) = 0;
protected: protected:
static base::string16 GetHelpUrlWithBoard(const std::string& original_url); static base::string16 GetHelpUrlWithBoard(const std::string& original_url);
......
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