| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @fileoverview Polymer element for displaying a summary of network states | 6 * @fileoverview Polymer element for displaying a summary of network states |
| 7 * by type: Ethernet, WiFi, Cellular, WiMAX, and VPN. | 7 * by type: Ethernet, WiFi, Cellular, WiMAX, and VPN. |
| 8 */ | 8 */ |
| 9 (function() { | 9 (function() { |
| 10 | 10 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 this.networkStateLists = networkStateLists; | 332 this.networkStateLists = networkStateLists; |
| 333 | 333 |
| 334 // Create a VPN entry in deviceStates if there are any VPN networks. | 334 // Create a VPN entry in deviceStates if there are any VPN networks. |
| 335 if (networkStateLists.VPN && networkStateLists.VPN.length > 0) { | 335 if (networkStateLists.VPN && networkStateLists.VPN.length > 0) { |
| 336 var vpn = { Type: CrOnc.Type.VPN, State: 'Enabled' }; | 336 var vpn = { Type: CrOnc.Type.VPN, State: 'Enabled' }; |
| 337 this.set('deviceStates.VPN', vpn); | 337 this.set('deviceStates.VPN', vpn); |
| 338 } | 338 } |
| 339 }, | 339 }, |
| 340 | 340 |
| 341 /** | 341 /** |
| 342 * Sets 'networkStates[type]' which will update the network-list-item | 342 * Sets 'networkStates[type]' which will update the cr-network-list-item |
| 343 * associated with 'type'. | 343 * associated with 'type'. |
| 344 * @param {string} type The network type. | 344 * @param {string} type The network type. |
| 345 * @param {?CrOnc.NetworkStateProperties} state The state properties for the | 345 * @param {?CrOnc.NetworkStateProperties} state The state properties for the |
| 346 * network to associate with |type|. May be null if there are no networks | 346 * network to associate with |type|. May be null if there are no networks |
| 347 * matching |type|. | 347 * matching |type|. |
| 348 * @private | 348 * @private |
| 349 */ | 349 */ |
| 350 updateNetworkState_: function(type, state) { | 350 updateNetworkState_: function(type, state) { |
| 351 this.set('networkStates.' + type, state); | 351 this.set('networkStates.' + type, state); |
| 352 if (state) | 352 if (state) |
| 353 this.networkIds_[state.GUID] = true; | 353 this.networkIds_[state.GUID] = true; |
| 354 }, | 354 }, |
| 355 }); | 355 }); |
| 356 })(); | 356 })(); |
| OLD | NEW |