| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * This partially describes the network list entries passed to | 6 * This partially describes the network list entries passed to |
| 7 * refreshNetworkData. The contents of those lists actually match | 7 * refreshNetworkData. The contents of those lists actually match |
| 8 * CrOnc.NetworkConfigType with the addition of the policyManaged property. | 8 * CrOnc.NetworkConfigType with the addition of the policyManaged property. |
| 9 * TODO(stevenjb): Use networkingPrivate.getNetworks. | 9 * TODO(stevenjb): Use networkingPrivate.getNetworks. |
| 10 * @typedef {{ | 10 * @typedef {{ |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 */ | 126 */ |
| 127 var enableDataRoaming_ = false; | 127 var enableDataRoaming_ = false; |
| 128 | 128 |
| 129 /** | 129 /** |
| 130 * Returns the display name for 'network'. | 130 * Returns the display name for 'network'. |
| 131 * @param {Object} data The network data dictionary. | 131 * @param {Object} data The network data dictionary. |
| 132 */ | 132 */ |
| 133 function getNetworkName(data) { | 133 function getNetworkName(data) { |
| 134 if (data.Type == 'Ethernet') | 134 if (data.Type == 'Ethernet') |
| 135 return loadTimeData.getString('ethernetName'); | 135 return loadTimeData.getString('ethernetName'); |
| 136 if (data.Type == 'VPN') |
| 137 return options.VPNProviders.formatNetworkName(new cr.onc.OncData(data)); |
| 136 return data.Name; | 138 return data.Name; |
| 137 } | 139 } |
| 138 | 140 |
| 139 /** | 141 /** |
| 140 * Create an element in the network list for controlling network | 142 * Create an element in the network list for controlling network |
| 141 * connectivity. | 143 * connectivity. |
| 142 * @param {Object} data Description of the network list or command. | 144 * @param {Object} data Description of the network list or command. |
| 143 * @constructor | 145 * @constructor |
| 144 * @extends {cr.ui.ListItem} | 146 * @extends {cr.ui.ListItem} |
| 145 */ | 147 */ |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 /** | 1236 /** |
| 1235 * Whether the Network list is disabled. Only used for display purpose. | 1237 * Whether the Network list is disabled. Only used for display purpose. |
| 1236 */ | 1238 */ |
| 1237 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); | 1239 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); |
| 1238 | 1240 |
| 1239 // Export | 1241 // Export |
| 1240 return { | 1242 return { |
| 1241 NetworkList: NetworkList | 1243 NetworkList: NetworkList |
| 1242 }; | 1244 }; |
| 1243 }); | 1245 }); |
| OLD | NEW |