| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // NOTE(dbeam): some platforms (i.e. Mac) always send 0% while | 270 // NOTE(dbeam): some platforms (i.e. Mac) always send 0% while |
| 271 // updating (they don't support incremental upgrade progress). Though | 271 // updating (they don't support incremental upgrade progress). Though |
| 272 // it's certainly quite possible to validly end up here with 0% on | 272 // it's certainly quite possible to validly end up here with 0% on |
| 273 // platforms that support incremental progress, nobody really likes | 273 // platforms that support incremental progress, nobody really likes |
| 274 // seeing that they're 0% done with something. | 274 // seeing that they're 0% done with something. |
| 275 return this.i18n('aboutUpgradeUpdatingPercent', progressPercent); | 275 return this.i18n('aboutUpgradeUpdatingPercent', progressPercent); |
| 276 } | 276 } |
| 277 return this.i18n('aboutUpgradeUpdating'); | 277 return this.i18n('aboutUpgradeUpdating'); |
| 278 default: | 278 default: |
| 279 function formatMessage(msg) { | 279 function formatMessage(msg) { |
| 280 return '<div>' + | 280 return parseHtmlSubset( |
| 281 parseHtmlSubset('<b>' + msg + '</b>').firstChild.innerHTML + | 281 '<b>' + msg + '</b>', ['br', 'pre']).firstChild.innerHTML; |
| 282 '</div>'; | |
| 283 } | 282 } |
| 284 var result = ''; | 283 var result = ''; |
| 285 var message = this.currentUpdateStatusEvent_.message; | 284 var message = this.currentUpdateStatusEvent_.message; |
| 286 if (!!message) | 285 if (message) |
| 287 result += formatMessage(message); | 286 result += formatMessage(message); |
| 288 var connectMessage = this.currentUpdateStatusEvent_.connectionTypes; | 287 var connectMessage = this.currentUpdateStatusEvent_.connectionTypes; |
| 289 if (!!connectMessage) | 288 if (connectMessage) |
| 290 result += formatMessage(connectMessage); | 289 result += '<div>' + formatMessage(connectMessage) + '</div>'; |
| 291 return result; | 290 return result; |
| 292 } | 291 } |
| 293 }, | 292 }, |
| 294 | 293 |
| 295 /** | 294 /** |
| 296 * @return {?string} | 295 * @return {?string} |
| 297 * @private | 296 * @private |
| 298 */ | 297 */ |
| 299 getIcon_: function() { | 298 getIcon_: function() { |
| 300 // If this platform has reached the end of the line, display an error icon | 299 // If this platform has reached the end of the line, display an error icon |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 }); | 409 }); |
| 411 }, | 410 }, |
| 412 | 411 |
| 413 // <if expr="_google_chrome"> | 412 // <if expr="_google_chrome"> |
| 414 /** @private */ | 413 /** @private */ |
| 415 onReportIssueTap_: function() { | 414 onReportIssueTap_: function() { |
| 416 this.aboutBrowserProxy_.openFeedbackDialog(); | 415 this.aboutBrowserProxy_.openFeedbackDialog(); |
| 417 }, | 416 }, |
| 418 // </if> | 417 // </if> |
| 419 }); | 418 }); |
| OLD | NEW |