From ec02ee4181c49b61fce1c8fb99292dbb8139cc90 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 12 Jul 2017 14:07:37 +0200 Subject: BASELINE: Update Chromium to 59.0.3071.134 Change-Id: Id02ef6fb2204c5fd21668a1c3e6911c83b17585a Reviewed-by: Alexandru Croitor --- .../settings/about_page/detailed_build_info.js | 41 ++++++++++++++++------ 1 file changed, 30 insertions(+), 11 deletions(-) (limited to 'chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js') diff --git a/chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js b/chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js index dfd68b2c07d..33a90b780c4 100644 --- a/chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js +++ b/chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js @@ -59,6 +59,29 @@ Polymer({ return version.length > 0; }, + /** + * @param {boolean} canChangeChannel + * @return {string} + * @private + */ + getChangeChannelIndicatorSourceName_: function(canChangeChannel) { + return loadTimeData.getBoolean('aboutEnterpriseManaged') ? '' : + loadTimeData.getString('ownerEmail'); + }, + + /** + * @param {boolean} canChangeChannel + * @return {CrPolicyIndicatorType} + * @private + */ + getChangeChannelIndicatorType_: function(canChangeChannel) { + if (canChangeChannel) + return CrPolicyIndicatorType.NONE; + return loadTimeData.getBoolean('aboutEnterpriseManaged') ? + CrPolicyIndicatorType.DEVICE_POLICY : + CrPolicyIndicatorType.OWNER; + }, + /** * @param {!Event} e * @private @@ -66,16 +89,12 @@ Polymer({ onChangeChannelTap_: function(e) { e.preventDefault(); this.showChannelSwitcherDialog_ = true; - // Async to wait for dialog to appear in the DOM. - this.async(function() { - var dialog = this.$$('settings-channel-switcher-dialog'); - // Register listener to detect when the dialog is closed. Flip the boolean - // once closed to force a restamp next time it is shown such that the - // previous dialog's contents are cleared. - dialog.addEventListener('close', function() { - this.showChannelSwitcherDialog_ = false; - this.updateChannelInfo_(); - }.bind(this)); - }.bind(this)); + }, + + /** @private */ + onChannelSwitcherDialogClosed_: function() { + this.showChannelSwitcherDialog_ = false; + this.$$('paper-button').focus(); + this.updateChannelInfo_(); }, }); -- cgit v1.2.3