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

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

Issue 2029453002: MD Settings: About page, implement obsolete/end-of-the-line status. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comment. Created 4 years, 7 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 cf6d80b91452582f3ec160ff9efb55bb48fd4544..59e1633a38d6b257c2b85ba756f17bdf1a64f628 100644
--- a/chrome/browser/resources/settings/about_page/about_page.js
+++ b/chrome/browser/resources/settings/about_page/about_page.js
@@ -36,6 +36,17 @@ Polymer({
/** @private {?RegulatoryInfo} */
regulatoryInfo_: Object,
</if>
+
+ /** @private {!{obsolete: boolean, endOfLine: boolean}} */
+ obsoleteSystemInfo_: {
+ type: Object,
+ value: function() {
+ return {
+ obsolete: loadTimeData.getBoolean('aboutObsoleteNowOrSoon'),
+ endOfLine: loadTimeData.getBoolean('aboutObsoleteEndOfTheLine'),
+ };
+ },
+ },
},
/** @private {?settings.AboutPageBrowserProxy} */
@@ -113,8 +124,18 @@ Polymer({
* @return {boolean}
* @private
*/
- shouldShowUpdateStatus_: function() {
- return this.currentUpdateStatusEvent_.status != UpdateStatus.DISABLED;
+ shouldShowUpdateStatusMessage_: function() {
+ return this.currentUpdateStatusEvent_.status != UpdateStatus.DISABLED &&
+ !this.obsoleteSystemInfo_.endOfLine;
+ },
+
+ /**
+ * @return {boolean}
+ * @private
+ */
+ shouldShowUpdateStatusIcon_: function() {
+ return this.currentUpdateStatusEvent_.status != UpdateStatus.DISABLED ||
+ this.obsoleteSystemInfo_.endOfLine;
},
/**
@@ -167,6 +188,11 @@ Polymer({
* @private
*/
getIcon_: function() {
+ // If this platform has reached the end of the line, display an error icon
+ // and ignore UpdateStatus.
+ if (this.obsoleteSystemInfo_.endOfLine)
+ return 'settings:error';
+
switch (this.currentUpdateStatusEvent_.status) {
case UpdateStatus.DISABLED_BY_ADMIN:
return 'cr:domain';
@@ -185,6 +211,9 @@ Polymer({
* @private
*/
getIconSrc_: function() {
+ if (this.obsoleteSystemInfo_.endOfLine)
+ return null;
+
switch (this.currentUpdateStatusEvent_.status) {
case UpdateStatus.CHECKING:
case UpdateStatus.UPDATING:
« no previous file with comments | « chrome/browser/resources/settings/about_page/about_page.html ('k') | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698