| 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 rendering network icons based on ONC | 6 * @fileoverview Polymer element for rendering network icons based on ONC |
| 7 * state properties. | 7 * state properties. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 */ | 77 */ |
| 78 showTechnology_: function() { | 78 showTechnology_: function() { |
| 79 return this.getTechnology_() != ''; | 79 return this.getTechnology_() != ''; |
| 80 }, | 80 }, |
| 81 | 81 |
| 82 /** | 82 /** |
| 83 * @return {string} | 83 * @return {string} |
| 84 * @private | 84 * @private |
| 85 */ | 85 */ |
| 86 getTechnology_: function() { | 86 getTechnology_: function() { |
| 87 let networkState = this.networkState; | 87 var networkState = this.networkState; |
| 88 if (!networkState) | 88 if (!networkState) |
| 89 return ''; | 89 return ''; |
| 90 let type = networkState.Type; | 90 var type = networkState.Type; |
| 91 if (type == CrOnc.Type.WI_MAX) | 91 if (type == CrOnc.Type.WI_MAX) |
| 92 return 'network:4g'; | 92 return 'network:4g'; |
| 93 if (type == CrOnc.Type.CELLULAR && networkState.Cellular) { | 93 if (type == CrOnc.Type.CELLULAR && networkState.Cellular) { |
| 94 let technology = | 94 var technology = |
| 95 this.getTechnologyId_(networkState.Cellular.NetworkTechnology); | 95 this.getTechnologyId_(networkState.Cellular.NetworkTechnology); |
| 96 if (technology != '') | 96 if (technology != '') |
| 97 return 'network:' + technology; | 97 return 'network:' + technology; |
| 98 } | 98 } |
| 99 return ''; | 99 return ''; |
| 100 }, | 100 }, |
| 101 | 101 |
| 102 /** | 102 /** |
| 103 * @param {string|undefined} networkTechnology | 103 * @param {string|undefined} networkTechnology |
| 104 * @return {string} | 104 * @return {string} |
| (...skipping 22 matching lines...) Expand all Loading... |
| 127 return 'badge-3g'; | 127 return 'badge-3g'; |
| 128 } | 128 } |
| 129 return ''; | 129 return ''; |
| 130 }, | 130 }, |
| 131 | 131 |
| 132 /** | 132 /** |
| 133 * @return {boolean} | 133 * @return {boolean} |
| 134 * @private | 134 * @private |
| 135 */ | 135 */ |
| 136 showSecure_: function() { | 136 showSecure_: function() { |
| 137 let networkState = this.networkState; | 137 var networkState = this.networkState; |
| 138 if (!this.networkState) | 138 if (!this.networkState) |
| 139 return false; | 139 return false; |
| 140 if (networkState.Type == CrOnc.Type.WI_FI && networkState.WiFi) { | 140 if (networkState.Type == CrOnc.Type.WI_FI && networkState.WiFi) { |
| 141 let security = networkState.WiFi.Security; | 141 var security = networkState.WiFi.Security; |
| 142 return !!security && security != 'None'; | 142 return !!security && security != 'None'; |
| 143 } | 143 } |
| 144 return false; | 144 return false; |
| 145 }, | 145 }, |
| 146 }); | 146 }); |
| OLD | NEW |