Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2354)

Unified Diff: chrome/browser/resources/settings/about_page/about_page.js

Issue 2698133003: MD Settings: About: Show connectionTypes message (Closed)
Patch Set: Build HTML in the JS instead of using multiple vars Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/about_page/about_page.js
diff --git a/chrome/browser/resources/settings/about_page/about_page.js b/chrome/browser/resources/settings/about_page/about_page.js
index e19861d4fab15100e55c8c1690fe1f05d0a22336..eb104bb03ff54ab91381dcd20c2c4a0679f9a915 100644
--- a/chrome/browser/resources/settings/about_page/about_page.js
+++ b/chrome/browser/resources/settings/about_page/about_page.js
@@ -260,7 +260,8 @@ Polymer({
// <if expr="chromeos">
if (this.currentChannel_ != this.targetChannel_) {
- return this.i18n('aboutUpgradeUpdatingChannelSwitch',
+ return this.i18n(
+ 'aboutUpgradeUpdatingChannelSwitch',
this.i18n(settings.browserChannelToI18nId(this.targetChannel_)),
progressPercent);
}
@@ -275,10 +276,21 @@ Polymer({
}
return this.i18n('aboutUpgradeUpdating');
default:
+ var result = '';
var message = this.currentUpdateStatusEvent_.message;
- return message ?
- parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML :
- '';
+ if (!!message) {
+ result += '<div>' +
+ parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML +
+ '</div>';
+ }
+ var connectMessage = this.currentUpdateStatusEvent_.connectionTypes;
+ if (!!connectMessage) {
+ result += '<div>' +
+ parseHtmlSubset('<b>' + connectMessage + '</b>')
dpapad 2017/02/17 02:48:14 It is also worth mentioning that this is only nece
stevenjb 2017/02/17 20:02:41 I think that in principal we prefer to call this f
+ .firstChild.innerHTML +
+ '</div>';
+ }
+ return result;
dpapad 2017/02/17 02:44:28 Nit(optional): We can avoid duplicate logic as fol
stevenjb 2017/02/17 20:02:41 Sure. Done.
}
},
@@ -299,9 +311,9 @@ Polymer({
return 'settings:error';
case UpdateStatus.UPDATED:
case UpdateStatus.NEARLY_UPDATED:
- return 'settings:check-circle';
+ return 'settings:check-circle';
default:
- return null;
+ return null;
}
},

Powered by Google App Engine
This is Rietveld 408576698