| Index: ui/webui/resources/cr_elements/network/cr_network_list_item.js
|
| diff --git a/ui/webui/resources/cr_elements/network/cr_network_list_item.js b/ui/webui/resources/cr_elements/network/cr_network_list_item.js
|
| index fcf6bb9c43520235c543c9a3042c9d3076b387dc..0b9a9e8b049a4efa83456851d3cf293af71a7908 100644
|
| --- a/ui/webui/resources/cr_elements/network/cr_network_list_item.js
|
| +++ b/ui/webui/resources/cr_elements/network/cr_network_list_item.js
|
| @@ -91,7 +91,7 @@ Polymer({
|
| }
|
| let network = /** @type {!CrOnc.NetworkStateProperties} */ (this.item);
|
| if (this.isListItem)
|
| - return this.getNetworkName_(network);
|
| + return CrOnc.getNetworkName(network, this.i18n);
|
| return this.i18n('OncType' + network.Type);
|
| },
|
|
|
| @@ -117,7 +117,7 @@ Polymer({
|
| return this.i18n('networkListItemConnected');
|
| if (network.Name && network.ConnectionState) {
|
| return this.getConnectionStateText_(
|
| - network.ConnectionState, this.getNetworkName_(network));
|
| + network.ConnectionState, CrOnc.getNetworkName(network, this.i18n));
|
| }
|
| return this.i18n('networkDisabled');
|
| },
|
| @@ -141,24 +141,6 @@ Polymer({
|
| return state;
|
| },
|
|
|
| - /**
|
| - * Returns the name to display for |network|.
|
| - * @param {?CrOnc.NetworkStateProperties} network
|
| - * @return {string}
|
| - */
|
| - getNetworkName_: function(network) {
|
| - let name = network.Name;
|
| - if (!name)
|
| - return this.i18n('OncType' + network.Type);
|
| - if (network.Type == 'VPN' && network.VPN &&
|
| - network.VPN.Type == 'ThirdPartyVPN' && network.VPN.ThirdPartyVPN) {
|
| - let providerName = network.VPN.ThirdPartyVPN.ProviderName;
|
| - if (providerName)
|
| - return this.i18n('vpnNameTemplate', providerName, name);
|
| - }
|
| - return name;
|
| - },
|
| -
|
| /** @private */
|
| isSettingsButtonVisible_: function() {
|
| return !!this.networkState && this.showButtons;
|
|
|