summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/policy_tool.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/policy_tool.js')
-rw-r--r--chromium/chrome/browser/resources/policy_tool.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/chromium/chrome/browser/resources/policy_tool.js b/chromium/chrome/browser/resources/policy_tool.js
index b80796d76dd..04c2ab2de66 100644
--- a/chromium/chrome/browser/resources/policy_tool.js
+++ b/chromium/chrome/browser/resources/policy_tool.js
@@ -173,6 +173,10 @@ policy.Page.prototype.initialize = function() {
chrome.send('exportLinux', [policy.Page.getInstance().getDictionary()]);
};
+ $('export-policies-mac').onclick = (event) => {
+ chrome.send('exportMac', [policy.Page.getInstance().getDictionary()]);
+ };
+
// Notify the browser that the page has loaded, causing it to send the
// list of all known policies and the values from the default session.
chrome.send('initialized');
@@ -243,6 +247,8 @@ policy.Policy.prototype.setStatus_ = function(value) {
status = loadTimeData.getString('unset');
} else if (value.error) {
status = value.error;
+ } else if (!value.valid) {
+ status = loadTimeData.getString('errorInvalidType');
} else {
status = loadTimeData.getString('ok');
}
@@ -256,7 +262,7 @@ policy.Policy.prototype.setStatus_ = function(value) {
*/
policy.Policy.prototype.setValue_ = function(value) {
this.value = value;
- if (!value) {
+ if (value === undefined) {
value = '';
} else if (typeof value != 'string') {
value = JSON.stringify(value);