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

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

Issue 2538043006: Settings: About: Fix cros channel info. (Closed)
Patch Set: . 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..f5b20d3dfe9ac353af64670fecc1405f3ecadc94 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,7 +34,19 @@ Polymer({
browserProxy.getVersionInfo().then(function(versionInfo) {
this.versionInfo_ = versionInfo;
}.bind(this));
- browserProxy.getCurrentChannel().then(function(channel) {
+
+ this.getChannel();
dpapad 2016/12/05 18:52:27 It took me a second to realize that |getChannel| a
stevenjb 2016/12/06 20:38:02 Done.
+
+ browserProxy.getCanChangeChannel().then(function(canChangeChannel) {
+ this.canChangeChannel_ = canChangeChannel;
+ }.bind(this));
+ },
+
+ /** @private */
+ getChannel: function() {
dpapad 2016/12/05 18:52:27 Private methods should end with "_" suffix.
stevenjb 2016/12/06 20:38:02 Done.
+ var browserProxy = settings.AboutPageBrowserProxyImpl.getInstance();
+ // We actually display the target channel for the 'Currently on' message.
dpapad 2016/12/05 18:52:27 Nit: s/We actually d/D/
stevenjb 2016/12/06 20:38:02 Done.
+ browserProxy.getTargetChannel().then(function(channel) {
this.currentlyOnChannelText_ = this.i18n(
'aboutCurrentlyOnChannel',
this.i18n(settings.browserChannelToI18nId(channel)));
@@ -66,6 +73,7 @@ Polymer({
// previous dialog's contents are cleared.
dialog.addEventListener('close', function() {
this.showChannelSwitcherDialog_ = false;
+ this.getChannel();
}.bind(this));
}.bind(this));
},

Powered by Google App Engine
This is Rietveld 408576698