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

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

Issue 614363002: Added Aura notification that relaunch and powerwash is required in case of downgrade. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring of SystemTrayDelegate(Windows|Linux) is delayed. Created 6 years, 2 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/help/help_page.js
diff --git a/chrome/browser/resources/help/help_page.js b/chrome/browser/resources/help/help_page.js
index 4a9f862e7681dc5c91619188de26e796c2295f4c..4140cd935aa0a721192a6e5c0787d34cc5f0d78c 100644
--- a/chrome/browser/resources/help/help_page.js
+++ b/chrome/browser/resources/help/help_page.js
@@ -52,6 +52,12 @@ cr.define('help', function() {
*/
message_: null,
+ /**
+ * True if user is allowed to change channels, false otherwise.
+ * @private
+ */
+ can_change_channel_: false,
+
/** @override */
initializePage: function() {
Page.prototype.initializePage.call(this);
@@ -315,6 +321,12 @@ cr.define('help', function() {
$('update-status-message').innerHTML = message;
}
+ if (cr.isChromeOS) {
+ $('change-channel').disabled = !this.can_change_channel_ ||
+ status == 'nearly_updated';
+ $('channel-change-disallowed-icon').hidden = this.can_change_channel_;
+ }
+
// Following invariant must be established at the end of this function:
// { ~$('relaunch_and_powerwash').hidden -> $('relaunch').hidden }
var relaunchAndPowerwashHidden = true;
@@ -495,8 +507,8 @@ cr.define('help', function() {
*/
updateEnableReleaseChannel_: function(enabled) {
this.updateChannelChangerContainerVisibility_(enabled);
- $('change-channel').disabled = !enabled;
- $('channel-change-disallowed-icon').hidden = enabled;
+ this.can_change_channel_ = enabled;
+ this.updateUI_();
},
/**
« no previous file with comments | « chrome/browser/chromeos/upgrade_detector_chromeos.cc ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698