| 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 and | 8 * CrOnc.NetworkConfigType with the addition of the policyManaged and |
| 9 * servicePath properties. TODO(stevenjb): Use networkingPrivate.getNetworks. | 9 * servicePath properties. TODO(stevenjb): Use networkingPrivate.getNetworks. |
| 10 * @typedef {{ | 10 * @typedef {{ |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 */ | 127 */ |
| 128 var enableDataRoaming_ = false; | 128 var enableDataRoaming_ = false; |
| 129 | 129 |
| 130 /** | 130 /** |
| 131 * Returns the display name for 'network'. | 131 * Returns the display name for 'network'. |
| 132 * @param {Object} data The network data dictionary. | 132 * @param {Object} data The network data dictionary. |
| 133 */ | 133 */ |
| 134 function getNetworkName(data) { | 134 function getNetworkName(data) { |
| 135 if (data.Type == 'Ethernet') | 135 if (data.Type == 'Ethernet') |
| 136 return loadTimeData.getString('ethernetName'); | 136 return loadTimeData.getString('ethernetName'); |
| 137 if (data.Type == 'VPN') { |
| 138 return options.VPNProviders.formatNetworkName(data.VPNProviderID, |
| 139 data.Name); |
| 140 } |
| 137 return data.Name; | 141 return data.Name; |
| 138 } | 142 } |
| 139 | 143 |
| 140 /** | 144 /** |
| 141 * Create an element in the network list for controlling network | 145 * Create an element in the network list for controlling network |
| 142 * connectivity. | 146 * connectivity. |
| 143 * @param {Object} data Description of the network list or command. | 147 * @param {Object} data Description of the network list or command. |
| 144 * @constructor | 148 * @constructor |
| 145 * @extends {cr.ui.ListItem} | 149 * @extends {cr.ui.ListItem} |
| 146 */ | 150 */ |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 /** | 1245 /** |
| 1242 * Whether the Network list is disabled. Only used for display purpose. | 1246 * Whether the Network list is disabled. Only used for display purpose. |
| 1243 */ | 1247 */ |
| 1244 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); | 1248 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); |
| 1245 | 1249 |
| 1246 // Export | 1250 // Export |
| 1247 return { | 1251 return { |
| 1248 NetworkList: NetworkList | 1252 NetworkList: NetworkList |
| 1249 }; | 1253 }; |
| 1250 }); | 1254 }); |
| OLD | NEW |