| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview 'settings-detailed-build-info' contains detailed build | 6 * @fileoverview 'settings-detailed-build-info' contains detailed build |
| 7 * information for ChromeOS. | 7 * information for ChromeOS. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 /** @private */ | 25 /** @private */ |
| 26 canChangeChannel_: Boolean, | 26 canChangeChannel_: Boolean, |
| 27 }, | 27 }, |
| 28 | 28 |
| 29 /** @override */ | 29 /** @override */ |
| 30 ready: function() { | 30 ready: function() { |
| 31 var browserProxy = settings.AboutPageBrowserProxyImpl.getInstance(); | 31 var browserProxy = settings.AboutPageBrowserProxyImpl.getInstance(); |
| 32 browserProxy.pageReady(); | 32 browserProxy.pageReady(); |
| 33 | 33 |
| 34 browserProxy.getVersionInfo().then(function(versionInfo) { | 34 browserProxy.getVersionInfo().then(versionInfo => { |
| 35 this.versionInfo_ = versionInfo; | 35 this.versionInfo_ = versionInfo; |
| 36 }.bind(this)); | 36 }); |
| 37 | 37 |
| 38 this.updateChannelInfo_(); | 38 this.updateChannelInfo_(); |
| 39 }, | 39 }, |
| 40 | 40 |
| 41 /** @private */ | 41 /** @private */ |
| 42 updateChannelInfo_: function() { | 42 updateChannelInfo_: function() { |
| 43 var browserProxy = settings.AboutPageBrowserProxyImpl.getInstance(); | 43 var browserProxy = settings.AboutPageBrowserProxyImpl.getInstance(); |
| 44 browserProxy.getChannelInfo().then(function(info) { | 44 browserProxy.getChannelInfo().then(info => { |
| 45 // Display the target channel for the 'Currently on' message. | 45 // Display the target channel for the 'Currently on' message. |
| 46 this.currentlyOnChannelText_ = this.i18n( | 46 this.currentlyOnChannelText_ = this.i18n( |
| 47 'aboutCurrentlyOnChannel', | 47 'aboutCurrentlyOnChannel', |
| 48 this.i18n(settings.browserChannelToI18nId(info.targetChannel))); | 48 this.i18n(settings.browserChannelToI18nId(info.targetChannel))); |
| 49 this.canChangeChannel_ = info.canChangeChannel; | 49 this.canChangeChannel_ = info.canChangeChannel; |
| 50 }.bind(this)); | 50 }); |
| 51 }, | 51 }, |
| 52 | 52 |
| 53 /** | 53 /** |
| 54 * @param {string} version | 54 * @param {string} version |
| 55 * @return {boolean} | 55 * @return {boolean} |
| 56 * @private | 56 * @private |
| 57 */ | 57 */ |
| 58 shouldShowVersion_: function(version) { | 58 shouldShowVersion_: function(version) { |
| 59 return version.length > 0; | 59 return version.length > 0; |
| 60 }, | 60 }, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 this.showChannelSwitcherDialog_ = true; | 92 this.showChannelSwitcherDialog_ = true; |
| 93 }, | 93 }, |
| 94 | 94 |
| 95 /** @private */ | 95 /** @private */ |
| 96 onChannelSwitcherDialogClosed_: function() { | 96 onChannelSwitcherDialogClosed_: function() { |
| 97 this.showChannelSwitcherDialog_ = false; | 97 this.showChannelSwitcherDialog_ = false; |
| 98 cr.ui.focusWithoutInk(assert(this.$$('paper-button'))); | 98 cr.ui.focusWithoutInk(assert(this.$$('paper-button'))); |
| 99 this.updateChannelInfo_(); | 99 this.updateChannelInfo_(); |
| 100 }, | 100 }, |
| 101 }); | 101 }); |
| OLD | NEW |