| 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 | 6 * @fileoverview |
| 7 * 'settings-internet-detail' is the settings subpage containing details | 7 * 'settings-internet-detail' is the settings subpage containing details |
| 8 * for a network. | 8 * for a network. |
| 9 */ | 9 */ |
| 10 (function() { | 10 (function() { |
| 11 'use strict'; | 11 'use strict'; |
| 12 | 12 |
| 13 /** @const */ var CARRIER_VERIZON = 'Verizon Wireless'; | 13 /** @const */ var CARRIER_VERIZON = 'Verizon Wireless'; |
| 14 | 14 |
| 15 Polymer({ | 15 Polymer({ |
| 16 is: 'settings-internet-detail-page', | 16 is: 'settings-internet-detail-page', |
| 17 | 17 |
| 18 behaviors: [CrPolicyNetworkBehavior], | 18 behaviors: [I18nBehavior, CrPolicyNetworkBehavior], |
| 19 | 19 |
| 20 properties: { | 20 properties: { |
| 21 /** | 21 /** |
| 22 * The network GUID to display details for. | 22 * The network GUID to display details for. |
| 23 */ | 23 */ |
| 24 guid: { | 24 guid: { |
| 25 type: String, | 25 type: String, |
| 26 value: '', | 26 value: '', |
| 27 }, | 27 }, |
| 28 | 28 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 getStateName_: function() { | 249 getStateName_: function() { |
| 250 return /** @type {string} */ ( | 250 return /** @type {string} */ ( |
| 251 CrOnc.getActiveValue(this.networkProperties.Name) || ''); | 251 CrOnc.getActiveValue(this.networkProperties.Name) || ''); |
| 252 }, | 252 }, |
| 253 | 253 |
| 254 /** | 254 /** |
| 255 * @return {string} The text to display for the network connection state. | 255 * @return {string} The text to display for the network connection state. |
| 256 * @private | 256 * @private |
| 257 */ | 257 */ |
| 258 getStateText_: function() { | 258 getStateText_: function() { |
| 259 // TODO(stevenjb): Localize. | 259 return this.i18n('Onc' + this.networkProperties.ConnectionState); |
| 260 return (this.networkProperties && this.networkProperties.ConnectionState) || | |
| 261 ''; | |
| 262 }, | 260 }, |
| 263 | 261 |
| 264 /** | 262 /** |
| 265 * @return {boolean} True if the network is connected. | 263 * @return {boolean} True if the network is connected. |
| 266 * @private | 264 * @private |
| 267 */ | 265 */ |
| 268 isConnectedState_: function() { | 266 isConnectedState_: function() { |
| 269 return this.networkProperties.ConnectionState == | 267 return this.networkProperties.ConnectionState == |
| 270 CrOnc.ConnectionState.CONNECTED; | 268 CrOnc.ConnectionState.CONNECTED; |
| 271 }, | 269 }, |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 */ | 747 */ |
| 750 allPropertiesMatch_: function(curValue, newValue) { | 748 allPropertiesMatch_: function(curValue, newValue) { |
| 751 for (let key in newValue) { | 749 for (let key in newValue) { |
| 752 if (newValue[key] != curValue[key]) | 750 if (newValue[key] != curValue[key]) |
| 753 return false; | 751 return false; |
| 754 } | 752 } |
| 755 return true; | 753 return true; |
| 756 } | 754 } |
| 757 }); | 755 }); |
| 758 })(); | 756 })(); |
| OLD | NEW |