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

Unified Diff: chrome/browser/resources/help/help.js

Issue 84233004: #relaunch-and-powerwash and #relaunch buttons are mutually exclusive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/help/help.js
diff --git a/chrome/browser/resources/help/help.js b/chrome/browser/resources/help/help.js
index d28094dee2a9898b045e03bff3376a0b1951683f..547b8054e44b30b5a974e57eceffabc66c4df86f 100644
--- a/chrome/browser/resources/help/help.js
+++ b/chrome/browser/resources/help/help.js
@@ -279,22 +279,27 @@ cr.define('help', function() {
$('update-status-message').innerHTML = message;
}
+ // Following invariant must be established at the end of this function:
+ // { ~$('relaunch_and_powerwash').hidden -> $('relaunch').hidden }
+ var relaunchAndPowerwashHidden = true;
+ if ($('relaunch-and-powerwash')) {
+ // It's allowed to do powerwash only for customer devices,
+ // when user explicitly decides to update to a more stable
+ // channel.
+ relaunchAndPowerwashHidden =
+ !this.powerwashAfterUpdate_ || status != 'nearly_updated';
+ $('relaunch-and-powerwash').hidden = relaunchAndPowerwashHidden;
+ }
+
var container = $('update-status-container');
if (container) {
container.hidden = status == 'disabled';
- $('relaunch').hidden = status != 'nearly_updated';
+ $('relaunch').hidden =
+ (status != 'nearly_updated') || !relaunchAndPowerwashHidden;
if (!cr.isMac)
$('update-percentage').hidden = status != 'updating';
}
-
- if ($('relaunch-and-powerwash')) {
- // It's allowed to do powerwash only for customer devices,
- // when user explicitly decides to update to a more stable
- // channel.
- $('relaunch-and-powerwash').hidden =
- !this.powerwashAfterUpdate_ || status != 'nearly_updated';
- }
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698