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

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

Issue 2655193002: MD Settings: Fix case where "Check for updates" is accidentally shown. (Closed)
Patch Set: Add test. Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/about_page_tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ef1eb16d17ba384209ecc1474744935e3b1b93d9..1e53ea6d7c58bbafc7b964ee3d70570a14eb1a22 100644
--- a/chrome/browser/resources/settings/about_page/about_page.js
+++ b/chrome/browser/resources/settings/about_page/about_page.js
@@ -373,8 +373,12 @@ Polymer({
* @private
*/
computeShowCheckUpdates_: function() {
- return !this.hasCheckedForUpdates_ ||
- this.checkStatus_(UpdateStatus.FAILED);
+ // Enable the update button if we are in a stale 'updated' status or
+ // update has failed. Disable it otherwise.
+ var staleUpdatedStatus = !this.hasCheckedForUpdates_ &&
+ this.checkStatus_(UpdateStatus.UPDATED);
+
+ return staleUpdatedStatus || this.checkStatus_(UpdateStatus.FAILED);
},
/**
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/about_page_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698