| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 var 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 var security = networkState.WiFi.Security; | 141 return false; |
| 142 return !!security && security != 'None'; | 142 if (!this.isListItem && |
| 143 networkState.ConnectionState == CrOnc.ConnectionState.NOT_CONNECTED) { |
| 144 return false; |
| 143 } | 145 } |
| 144 return false; | 146 var security = networkState.WiFi.Security; |
| 147 return !!security && security != 'None'; |
| 145 }, | 148 }, |
| 146 }); | 149 }); |
| OLD | NEW |