OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 'settings-channel-switcher-dialog' is a component allowing the | 6 * @fileoverview 'settings-channel-switcher-dialog' is a component allowing the |
7 * user to switch between release channels (dev, beta, stable). A | 7 * user to switch between release channels (dev, beta, stable). A |
8 * |target-channel-changed| event is fired if the user does select a different | 8 * |target-channel-changed| event is fired if the user does select a different |
9 * release channel to notify parents of this dialog. | 9 * release channel to notify parents of this dialog. |
10 */ | 10 */ |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 // Selected channel is the same as the current channel, allow the user to | 133 // Selected channel is the same as the current channel, allow the user to |
134 // change without warnings. | 134 // change without warnings. |
135 if (selectedChannel == this.currentChannel_) { | 135 if (selectedChannel == this.currentChannel_) { |
136 this.updateButtons_(true, false); | 136 this.updateButtons_(true, false); |
137 this.warning_ = null; | 137 this.warning_ = null; |
138 return; | 138 return; |
139 } | 139 } |
140 | 140 |
141 if (settings.isTargetChannelMoreStable( | 141 if (settings.isTargetChannelMoreStable( |
142 this.currentChannel_, selectedChannel)) { | 142 this.currentChannel_, selectedChannel)) { |
143 // More stable channel selected. For non managed devices, notify the user | 143 // More stable channel selected. For non managed devices, notify the user |
144 // about powerwash. | 144 // about powerwash. |
145 if (loadTimeData.getBoolean('aboutEnterpriseManaged')) { | 145 if (loadTimeData.getBoolean('aboutEnterpriseManaged')) { |
146 this.updateWarning_( | 146 this.updateWarning_( |
147 'aboutDelayedWarningTitle', 'aboutDelayedWarningMessage', | 147 'aboutDelayedWarningTitle', 'aboutDelayedWarningMessage', |
148 'aboutProductTitle'); | 148 'aboutProductTitle'); |
149 this.updateButtons_(true, false); | 149 this.updateButtons_(true, false); |
150 } else { | 150 } else { |
151 this.updateWarning_( | 151 this.updateWarning_( |
152 'aboutPowerwashWarningTitle', 'aboutPowerwashWarningMessage'); | 152 'aboutPowerwashWarningTitle', 'aboutPowerwashWarningMessage'); |
(...skipping 13 matching lines...) Expand all Loading... |
166 }, | 166 }, |
167 | 167 |
168 /** | 168 /** |
169 * @return {boolean} | 169 * @return {boolean} |
170 * @private | 170 * @private |
171 */ | 171 */ |
172 shouldShowWarning_: function() { | 172 shouldShowWarning_: function() { |
173 return this.warning_ !== null; | 173 return this.warning_ !== null; |
174 }, | 174 }, |
175 }); | 175 }); |
OLD | NEW |