| 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-about-page' contains version and OS related | 6 * @fileoverview 'settings-about-page' contains version and OS related |
| 7 * information. | 7 * information. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-about-page', | 10 is: 'settings-about-page', |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 return this.i18n('aboutUpgradeCheckStarted'); | 153 return this.i18n('aboutUpgradeCheckStarted'); |
| 154 case UpdateStatus.NEARLY_UPDATED: | 154 case UpdateStatus.NEARLY_UPDATED: |
| 155 <if expr="chromeos"> | 155 <if expr="chromeos"> |
| 156 if (this.currentChannel_ != this.targetChannel_) | 156 if (this.currentChannel_ != this.targetChannel_) |
| 157 return this.i18n('aboutUpgradeSuccessChannelSwitch'); | 157 return this.i18n('aboutUpgradeSuccessChannelSwitch'); |
| 158 </if> | 158 </if> |
| 159 return this.i18n('aboutUpgradeRelaunch'); | 159 return this.i18n('aboutUpgradeRelaunch'); |
| 160 case UpdateStatus.UPDATED: | 160 case UpdateStatus.UPDATED: |
| 161 return this.i18n('aboutUpgradeUpToDate'); | 161 return this.i18n('aboutUpgradeUpToDate'); |
| 162 case UpdateStatus.UPDATING: | 162 case UpdateStatus.UPDATING: |
| 163 assert(typeof this.currentUpdateStatusEvent_.progress == 'number'); |
| 164 var progressPercent = this.currentUpdateStatusEvent_.progress + '%'; |
| 165 |
| 163 <if expr="chromeos"> | 166 <if expr="chromeos"> |
| 164 if (this.currentChannel_ != this.targetChannel_) { | 167 if (this.currentChannel_ != this.targetChannel_) { |
| 165 return this.i18n('aboutUpgradeUpdatingChannelSwitch', | 168 return this.i18n('aboutUpgradeUpdatingChannelSwitch', |
| 166 this.i18n(settings.browserChannelToI18nId(this.targetChannel_))); | 169 this.i18n(settings.browserChannelToI18nId(this.targetChannel_)), |
| 170 progressPercent); |
| 167 } | 171 } |
| 168 </if> | 172 </if> |
| 169 return this.i18n('aboutUpgradeUpdating'); | 173 return this.i18n('aboutUpgradeUpdating', progressPercent); |
| 170 default: | 174 default: |
| 171 var message = this.currentUpdateStatusEvent_.message; | 175 var message = this.currentUpdateStatusEvent_.message; |
| 172 return message ? | 176 return message ? |
| 173 parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML : | 177 parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML : |
| 174 ''; | 178 ''; |
| 175 } | 179 } |
| 176 }, | 180 }, |
| 177 | 181 |
| 178 /** | 182 /** |
| 179 * @return {?string} | 183 * @return {?string} |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 }); | 293 }); |
| 290 }, | 294 }, |
| 291 | 295 |
| 292 <if expr="_google_chrome"> | 296 <if expr="_google_chrome"> |
| 293 /** @private */ | 297 /** @private */ |
| 294 onReportIssueTap_: function() { | 298 onReportIssueTap_: function() { |
| 295 this.aboutBrowserProxy_.openFeedbackDialog(); | 299 this.aboutBrowserProxy_.openFeedbackDialog(); |
| 296 }, | 300 }, |
| 297 </if> | 301 </if> |
| 298 }); | 302 }); |
| OLD | NEW |