summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-12 14:07:37 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-17 10:29:26 +0000
commitec02ee4181c49b61fce1c8fb99292dbb8139cc90 (patch)
tree25cde714b2b71eb639d1cd53f5a22e9ba76e14ef /chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js
parentbb09965444b5bb20b096a291445170876225268d (diff)
BASELINE: Update Chromium to 59.0.3071.134
Change-Id: Id02ef6fb2204c5fd21668a1c3e6911c83b17585a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js')
-rw-r--r--chromium/chrome/browser/resources/settings/about_page/detailed_build_info.js41
1 files changed, 30 insertions, 11 deletions
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
@@ -60,22 +60,41 @@ Polymer({
},
/**
+ * @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
*/
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_();
},
});