Commit 6c71e52e authored by Kyle Horimoto's avatar Kyle Horimoto

[CrOS Network] Fix crash when opening Internet detail dialog.

A previous CL [1] used a newly-added string as part of the
<network-proxy-exclusions> element. This element is shared between both
the settings page and the Internet detail dialog.

However, the newly-added string was only added to the WebUIDataSource
belonging to settings and was not added to the dialog's. This CL fixes
this crash by adding the string to the shared
chromeos::network_element::AddDetailsLocalizedStrings() function
instead.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1669183

Bug: 978762
Change-Id: Ibc5f06d6f3db71b06e55c8c96e717fb08c4d42ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1679099
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672701}
parent a0f813c9
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "chromeos/login/login_state/login_state.h" #include "chromeos/login/login_state/login_state.h"
#include "chromeos/network/network_connection_handler.h" #include "chromeos/network/network_connection_handler.h"
#include "components/login/localized_values_builder.h" #include "components/login/localized_values_builder.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/web_ui_data_source.h" #include "content/public/browser/web_ui_data_source.h"
#include "third_party/cros_system_api/dbus/service_constants.h" #include "third_party/cros_system_api/dbus/service_constants.h"
...@@ -255,6 +256,7 @@ void AddDetailsLocalizedStrings(content::WebUIDataSource* html_source) { ...@@ -255,6 +256,7 @@ void AddDetailsLocalizedStrings(content::WebUIDataSource* html_source) {
IDS_SETTINGS_INTERNET_NETWORK_NAMESERVERS_GOOGLE}, IDS_SETTINGS_INTERNET_NETWORK_NAMESERVERS_GOOGLE},
{"networkProxyWpad", IDS_SETTINGS_INTERNET_NETWORK_PROXY_WPAD}, {"networkProxyWpad", IDS_SETTINGS_INTERNET_NETWORK_PROXY_WPAD},
{"networkProxyWpadNone", IDS_SETTINGS_INTERNET_NETWORK_PROXY_WPAD_NONE}, {"networkProxyWpadNone", IDS_SETTINGS_INTERNET_NETWORK_PROXY_WPAD_NONE},
{"remove", IDS_REMOVE},
}; };
AddLocalizedStringsBulk(html_source, kLocalizedStrings, AddLocalizedStringsBulk(html_source, kLocalizedStrings,
base::size(kLocalizedStrings)); base::size(kLocalizedStrings));
......
...@@ -151,7 +151,6 @@ void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) { ...@@ -151,7 +151,6 @@ void AddCommonStrings(content::WebUIDataSource* html_source, Profile* profile) {
{"menuButtonLabel", IDS_SETTINGS_MENU_BUTTON_LABEL}, {"menuButtonLabel", IDS_SETTINGS_MENU_BUTTON_LABEL},
{"moreActions", IDS_SETTINGS_MORE_ACTIONS}, {"moreActions", IDS_SETTINGS_MORE_ACTIONS},
{"ok", IDS_OK}, {"ok", IDS_OK},
{"remove", IDS_REMOVE},
{"restart", IDS_SETTINGS_RESTART}, {"restart", IDS_SETTINGS_RESTART},
#if !defined(OS_CHROMEOS) #if !defined(OS_CHROMEOS)
{"restartToApplyChanges", IDS_SETTINGS_RESTART_TO_APPLY_CHANGES}, {"restartToApplyChanges", IDS_SETTINGS_RESTART_TO_APPLY_CHANGES},
......
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