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

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

Issue 2698133003: MD Settings: About: Show connectionTypes message (Closed)
Patch Set: Rebase 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..0f54c43211a4c32606b6b477b0625e911cecbd35 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,19 @@ Polymer({
}
return this.i18n('aboutUpgradeUpdating');
default:
+ function formatMessage(msg) {
+ return '<div>' +
+ parseHtmlSubset('<b>' + msg + '</b>').firstChild.innerHTML +
+ '</div>';
+ }
+ var result = '';
var message = this.currentUpdateStatusEvent_.message;
- return message ?
- parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML :
- '';
+ if (!!message)
Dan Beam 2017/02/24 00:50:57 this is the same as if (message)
+ result += formatMessage(message);
+ var connectMessage = this.currentUpdateStatusEvent_.connectionTypes;
+ if (!!connectMessage)
+ result += formatMessage(connectMessage);
+ return result;
}
},
@@ -299,9 +309,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