Chromium Code Reviews| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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'); | 163 assert(typeof this.currentUpdateStatusEvent_.progress == 'number'); |
| 164 var progressPercent = this.currentUpdateStatusEvent_.progress + '%'; | 164 var progressPercent = this.currentUpdateStatusEvent_.progress + '%'; |
| 165 | 165 |
| 166 <if expr="chromeos"> | 166 <if expr="chromeos"> |
| 167 if (this.currentChannel_ != this.targetChannel_) { | 167 if (this.currentChannel_ != this.targetChannel_) { |
| 168 return this.i18n('aboutUpgradeUpdatingChannelSwitch', | 168 return this.i18n('aboutUpgradeUpdatingChannelSwitch', |
| 169 this.i18n(settings.browserChannelToI18nId(this.targetChannel_)), | 169 this.i18n(settings.browserChannelToI18nId(this.targetChannel_)), |
| 170 progressPercent); | 170 progressPercent); |
|
Dan Beam
2016/11/09 21:21:13
i don't really care much about making a non-percen
| |
| 171 } | 171 } |
| 172 </if> | 172 </if> |
| 173 return this.i18n('aboutUpgradeUpdating', progressPercent); | 173 if (this.currentUpdateStatusEvent_.progress > 0) { |
| 174 // NOTE(dbeam): some platforms (i.e. Mac) always send 0% while | |
| 175 // updating (they don't support incremental upgrade progress). Though | |
| 176 // it's certainly quite possible to validly end up here with 0% on | |
| 177 // platforms that support incremental progress, nobody really likes | |
| 178 // seeing that they're 0% done with something. | |
| 179 return this.i18n('aboutUpgradeUpdatingPercent', progressPercent); | |
| 180 } | |
| 181 return this.i18n('aboutUpgradeUpdating'); | |
| 174 default: | 182 default: |
| 175 var message = this.currentUpdateStatusEvent_.message; | 183 var message = this.currentUpdateStatusEvent_.message; |
| 176 return message ? | 184 return message ? |
| 177 parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML : | 185 parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML : |
| 178 ''; | 186 ''; |
| 179 } | 187 } |
| 180 }, | 188 }, |
| 181 | 189 |
| 182 /** | 190 /** |
| 183 * @return {?string} | 191 * @return {?string} |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 293 }); | 301 }); |
| 294 }, | 302 }, |
| 295 | 303 |
| 296 <if expr="_google_chrome"> | 304 <if expr="_google_chrome"> |
| 297 /** @private */ | 305 /** @private */ |
| 298 onReportIssueTap_: function() { | 306 onReportIssueTap_: function() { |
| 299 this.aboutBrowserProxy_.openFeedbackDialog(); | 307 this.aboutBrowserProxy_.openFeedbackDialog(); |
| 300 }, | 308 }, |
| 301 </if> | 309 </if> |
| 302 }); | 310 }); |
| OLD | NEW |