Commit 479b1030 authored by Guillaume Jenkins's avatar Guillaume Jenkins Committed by Commit Bot

[iOS Enterprise] Add iOS support for the MetricsReportingEnabled policy

Adds support for the simple policy MetricsReportingEnabled.

Change-Id: Id9959f8c8ffae88483ae39a2d93cc9d11e0f47ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404480Reviewed-by: default avatarOwen Min <zmin@chromium.org>
Reviewed-by: default avatarsebsg <sebsg@chromium.org>
Commit-Queue: Guillaume Jenkins <gujen@google.com>
Cr-Commit-Position: refs/heads/master@{#806192}
parent 99239417
......@@ -3042,6 +3042,7 @@
'type': 'main',
'schema': { 'type': 'boolean' },
'supported_on': ['chrome.*:8-'],
'future_on': [ 'ios' ],
'features': {
'can_be_recommended': True,
'dynamic_refresh': False,
......@@ -40,6 +40,7 @@ source_set("policy") {
"//components/bookmarks/common",
"//components/bookmarks/managed",
"//components/enterprise",
"//components/metrics",
"//components/password_manager/core/common",
"//components/policy:generated",
"//components/policy/core/common",
......@@ -116,8 +117,8 @@ source_set("test_support") {
bundle_data("test_resources") {
visibility = [
":unit_tests",
":eg2_tests",
":unit_tests",
]
testonly = true
sources = [ "//ios/chrome/test/data/policy/policy_test_cases.json" ]
......
......@@ -12,6 +12,7 @@
#include "components/bookmarks/managed/managed_bookmarks_policy_handler.h"
#include "components/content_settings/core/common/pref_names.h"
#include "components/enterprise/browser/reporting/common_pref_names.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/policy/core/browser/configuration_policy_handler.h"
#include "components/policy/core/browser/configuration_policy_handler_list.h"
......@@ -59,6 +60,9 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = {
{ policy::key::kDefaultPopupsSetting,
prefs::kManagedDefaultPopupsSetting,
base::Value::Type::INTEGER },
{ policy::key::kMetricsReportingEnabled,
metrics::prefs::kMetricsReportingEnabled,
base::Value::Type::BOOLEAN },
{ policy::key::kPopupsAllowedForUrls,
prefs::kManagedPopupsAllowedForUrls,
base::Value::Type::LIST },
......
......@@ -308,6 +308,16 @@
]
},
"MetricsReportingEnabled": {
"os": [ "ios" ],
"policy_pref_mapping_test": [
{
"policies": { "MetricsReportingEnabled": false },
"prefs": { "user_experience_metrics.reporting_enabled": { "local_state": true } }
}
]
},
"PasswordManagerEnabled": {
"os": [ "ios" ],
"can_be_recommended": true,
......@@ -349,7 +359,7 @@
"prefs":{
"printing.enabled":{
"value": true
}
}
}
},
{
......@@ -357,7 +367,7 @@
"prefs":{
"printing.enabled":{
"value": false
}
}
}
}
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment