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

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

Issue 2538043006: Settings: About: Fix cros channel info. (Closed)
Patch Set: Fix non cros tests Created 4 years 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/detailed_build_info.js
diff --git a/chrome/browser/resources/settings/about_page/detailed_build_info.js b/chrome/browser/resources/settings/about_page/detailed_build_info.js
index ab301700ec3036ca490badaaf5987f80ffab750f..685be3b44805e679540ff0278e4b765adba7ae3e 100644
--- a/chrome/browser/resources/settings/about_page/detailed_build_info.js
+++ b/chrome/browser/resources/settings/about_page/detailed_build_info.js
@@ -23,12 +23,7 @@ Polymer({
showChannelSwitcherDialog_: Boolean,
/** @private */
- canChangeChannel_: {
- type: Boolean,
- value: function() {
- return loadTimeData.getBoolean('aboutCanChangeChannel');
- },
- },
+ canChangeChannel_: Boolean,
},
/** @override */
@@ -39,10 +34,19 @@ Polymer({
browserProxy.getVersionInfo().then(function(versionInfo) {
this.versionInfo_ = versionInfo;
}.bind(this));
- browserProxy.getCurrentChannel().then(function(channel) {
+
+ this.updateChannelInfo_();
+ },
+
+ /** @private */
+ updateChannelInfo_: function() {
+ var browserProxy = settings.AboutPageBrowserProxyImpl.getInstance();
+ browserProxy.getChannelInfo().then(function(info) {
+ // Display the target channel for the 'Currently on' message.
this.currentlyOnChannelText_ = this.i18n(
'aboutCurrentlyOnChannel',
- this.i18n(settings.browserChannelToI18nId(channel)));
+ this.i18n(settings.browserChannelToI18nId(info.targetChannel)));
+ this.canChangeChannel_ = info.canChangeChannel;
}.bind(this));
},
@@ -66,6 +70,7 @@ Polymer({
// previous dialog's contents are cleared.
dialog.addEventListener('close', function() {
this.showChannelSwitcherDialog_ = false;
+ this.updateChannelInfo_();
}.bind(this));
}.bind(this));
},

Powered by Google App Engine
This is Rietveld 408576698