Commit 7b9eaf96 authored by knn's avatar knn Committed by Commit bot

Relanding Add i18n support for Android App Restrictions.

Reason for revert:
Changing the first output of grd file caused build to fail due to a bad depfile. Now depfile depends on a stampfile instead of first output.
Hence this also adds an additional grit roll from r187 to r188.

Effective grit roll from r186:r188

188: Allow depending on stamp for grit files.
187: Add a Policy template writer that generates Android resources which can be exposed through Android's App Restriction Schema.

Original issue's description:
> Revert of Add i18n support for Android App Restrictions. (patchset #7 id:120001 of https://codereview.chromium.org/865573002/)
>
> Reason for revert:
> Broke some GN builds, e.g.:
>
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN/builds/24483/steps/compile/logs/stdio
> http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20GN/builds/11092/steps/compile/logs/stdio
>
> ninja: Entering directory `/mnt/data/b/build/slave/Linux_GN/build/src/out/Release'
> ninja:error: expected depfile 'gen/chrome/policy_templates.d' to mention 'gen/chrome/app/policy/common/html/am/chrome_policy_list.html', got 'gen/chrome/app/policy/linux/examples/chrome.json'
>
>
> Committed: https://crrev.com/27ee0fa9afe9cb97016e532bd0cecd1b011251b9
> Cr-Commit-Position: refs/heads/master@{#319773}

BUG=450548

Review URL: https://codereview.chromium.org/997523002

Cr-Commit-Position: refs/heads/master@{#322366}
parent 544064fe
...@@ -161,7 +161,7 @@ deps = { ...@@ -161,7 +161,7 @@ deps = {
Var('chromium_git') + '/external/snappy.git' + '@' + '762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', Var('chromium_git') + '/external/snappy.git' + '@' + '762bb32f0c9d2f31ba4958c7c0933d22e80c20bf',
'src/tools/grit': 'src/tools/grit':
Var('chromium_git') + '/external/grit-i18n.git' + '@' + '0287c187b11ed53590254e4d817e836a44a7a1a7', # from svn revision 186 Var('chromium_git') + '/external/grit-i18n.git' + '@' + '0ac6d137916c4d7a45ae7d61f892652a1a4cce33', # from svn revision 188
'src/tools/gyp': 'src/tools/gyp':
Var('chromium_git') + '/external/gyp.git' + '@' + 'd174d75bf69c682cb62af9187879e01513b35e52', Var('chromium_git') + '/external/gyp.git' + '@' + 'd174d75bf69c682cb62af9187879e01513b35e52',
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome', 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy', 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy',
'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
'android_resources_out_dir': '<(policy_out_dir)/android_resources',
'generate_policy_source_script_path': 'generate_policy_source_script_path':
'policy/tools/generate_policy_source.py', 'policy/tools/generate_policy_source.py',
'policy_constant_header_path': 'policy_constant_header_path':
...@@ -22,9 +21,7 @@ ...@@ -22,9 +21,7 @@
'protobuf_decoder_path': 'protobuf_decoder_path':
'<(policy_out_dir)/policy/cloud_policy_generated.cc', '<(policy_out_dir)/policy/cloud_policy_generated.cc',
'app_restrictions_path': 'app_restrictions_path':
'<(android_resources_out_dir)/xml-v21/app_restrictions.xml', '<(policy_out_dir)/app_restrictions.xml',
'app_resources_path':
'<(android_resources_out_dir)/values-v21/restriction_values.xml',
# This is the "full" protobuf, which defines one protobuf message per # This is the "full" protobuf, which defines one protobuf message per
# policy. It is also the format currently used by the server. # policy. It is also the format currently used by the server.
'chrome_settings_proto_path': 'chrome_settings_proto_path':
...@@ -115,7 +112,6 @@ ...@@ -115,7 +112,6 @@
'<(chrome_settings_proto_path)', '<(chrome_settings_proto_path)',
'<(cloud_policy_proto_path)', '<(cloud_policy_proto_path)',
'<(app_restrictions_path)', '<(app_restrictions_path)',
'<(app_resources_path)',
], ],
'action_name': 'generate_policy_source', 'action_name': 'generate_policy_source',
'action': [ 'action': [
...@@ -127,7 +123,6 @@ ...@@ -127,7 +123,6 @@
'--cloud-policy-protobuf=<(cloud_policy_proto_path)', '--cloud-policy-protobuf=<(cloud_policy_proto_path)',
'--cloud-policy-decoder=<(protobuf_decoder_path)', '--cloud-policy-decoder=<(protobuf_decoder_path)',
'--app-restrictions-definition=<(app_restrictions_path)', '--app-restrictions-definition=<(app_restrictions_path)',
'--app-restrictions-resources=<(app_resources_path)',
'<(OS)', '<(OS)',
'<(chromeos)', '<(chromeos)',
'policy/resources/policy_templates.json', 'policy/resources/policy_templates.json',
...@@ -137,7 +132,6 @@ ...@@ -137,7 +132,6 @@
['OS!="android"', { ['OS!="android"', {
'outputs!': [ 'outputs!': [
'<(app_restrictions_path)', '<(app_restrictions_path)',
'<(app_resources_path)',
], ],
}], }],
], ],
...@@ -372,7 +366,7 @@ ...@@ -372,7 +366,7 @@
}, },
], ],
}], }],
['OS=="win" or OS=="mac" or OS=="linux"', { ['OS!="ios"', {
'targets': [ 'targets': [
{ {
# policy_templates has different inputs and outputs, so it can't use # policy_templates has different inputs and outputs, so it can't use
......
...@@ -47,9 +47,6 @@ if (enable_configuration_policy) { ...@@ -47,9 +47,6 @@ if (enable_configuration_policy) {
# build puts everything into the following directory. We do the same for now. # build puts everything into the following directory. We do the same for now.
policy_gen_dir = "$root_gen_dir/policy" policy_gen_dir = "$root_gen_dir/policy"
# Directory for generating Android App Restrictions resources
android_resources_gen_dir = "$policy_gen_dir/android_resources"
# This protobuf is equivalent to chrome_settings.proto but shares messages # This protobuf is equivalent to chrome_settings.proto but shares messages
# for policies of the same type, so that less classes have to be generated # for policies of the same type, so that less classes have to be generated
# and compiled. # and compiled.
...@@ -62,10 +59,7 @@ if (enable_configuration_policy) { ...@@ -62,10 +59,7 @@ if (enable_configuration_policy) {
constants_header_path = "$policy_gen_dir/policy_constants.h" constants_header_path = "$policy_gen_dir/policy_constants.h"
constants_source_path = "$policy_gen_dir/policy_constants.cc" constants_source_path = "$policy_gen_dir/policy_constants.cc"
protobuf_decoder_path = "$policy_gen_dir/cloud_policy_generated.cc" protobuf_decoder_path = "$policy_gen_dir/cloud_policy_generated.cc"
app_restrictions_path = app_restrictions_path = "$policy_gen_dir/app_restrictions.xml"
"$android_resources_gen_dir/xml-v21/app_restrictions.xml"
app_resources_path =
"$android_resources_gen_dir/values-v21/restriction_values.xml"
action("cloud_policy_code_generate") { action("cloud_policy_code_generate") {
script = "tools/generate_policy_source.py" script = "tools/generate_policy_source.py"
...@@ -86,14 +80,10 @@ if (enable_configuration_policy) { ...@@ -86,14 +80,10 @@ if (enable_configuration_policy) {
chrome_settings_proto_path, chrome_settings_proto_path,
cloud_policy_proto_path, cloud_policy_proto_path,
app_restrictions_path, app_restrictions_path,
app_resources_path,
] ]
if (current_os != "android") { if (target_os != "android") {
outputs -= [ outputs -= [ app_restrictions_path ]
app_restrictions_path,
app_resources_path,
]
} }
args = [ args = [
...@@ -109,14 +99,41 @@ if (enable_configuration_policy) { ...@@ -109,14 +99,41 @@ if (enable_configuration_policy) {
rebase_path(protobuf_decoder_path, root_build_dir), rebase_path(protobuf_decoder_path, root_build_dir),
"--app-restrictions-definition=" + "--app-restrictions-definition=" +
rebase_path(app_restrictions_path, root_build_dir), rebase_path(app_restrictions_path, root_build_dir),
"--app-restrictions-resources=" + target_os,
rebase_path(app_resources_path, root_build_dir),
current_os,
chromeos_flag, chromeos_flag,
rebase_path("resources/policy_templates.json", root_build_dir), rebase_path("resources/policy_templates.json", root_build_dir),
] ]
} }
grit("policy_templates") {
import("resources/policy_templates.gni")
source = "resources/policy_templates.grd"
use_qualified_include = true
depend_on_stamp = true
output_dir = "$root_gen_dir/chrome"
outputs = policy_templates_doc_outputs
if (is_android) {
outputs += policy_templates_android_outputs
}
if (is_linux) {
outputs += policy_templates_linux_outputs
}
if (is_mac) {
outputs += policy_templates_mac_outputs
# TODO(knn) : Move this out once more targets use this.
if (is_chrome_branded) {
mac_bundle_id = "com.google.Chrome"
} else {
mac_bundle_id = "org.chromium.Chromium"
}
defines = [ "mac_bundle_id=$mac_bundle_id" ]
}
if (is_win) {
outputs += policy_templates_windows_outputs
}
}
proto_library("cloud_policy_proto_generated_compile") { proto_library("cloud_policy_proto_generated_compile") {
sources = [ sources = [
cloud_policy_proto_path, cloud_policy_proto_path,
...@@ -220,4 +237,4 @@ if (enable_configuration_policy) { ...@@ -220,4 +237,4 @@ if (enable_configuration_policy) {
] ]
} }
} }
#TODO(GYP) policy templates, chrome_manifest_bundle #TODO(GYP) chrome_manifest_bundle
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file contains the list of outputs from policy_templates.grd
# for use within GN. It should always mirror the list in policy_templates.grd.
policy_templates_base_dir = "$root_gen_dir/chrome/app/policy"
policy_templates_android_outputs = [
"$policy_templates_base_dir/android/values-am-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ar-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-bg-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-bn-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ca-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-cs-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-da-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-de-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-el-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-en-rGB-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-es-rES-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-es-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-et-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-fa-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-fi-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-fil-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-fr-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-gu-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-he-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-hi-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-hr-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-hu-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-id-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-it-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ja-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-kn-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ko-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-lt-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-lv-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ml-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-mr-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ms-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-nb-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-nl-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-pl-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-pt-rBR-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-pt-rPT-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ro-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ru-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-sk-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-sl-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-sr-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-sv-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-sw-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-ta-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-te-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-th-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-tr-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-uk-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-vi-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-zh-rCN-v21/restriction_values.xml",
"$policy_templates_base_dir/android/values-zh-rTW-v21/restriction_values.xml",
]
policy_templates_doc_outputs = [
"$policy_templates_base_dir/common/html/am/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ar/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/bg/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/bn/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ca/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/cs/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/da/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/de/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/el/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/en-GB/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/en-US/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/es-419/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/es/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/et/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/fa/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/fi/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/fil/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/fr/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/gu/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/he/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/hi/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/hr/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/hu/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/id/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/it/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ja/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/kn/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ko/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/lt/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/lv/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ml/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/mr/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ms/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/nb/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/nl/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/pl/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/pt-BR/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/pt-PT/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ro/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ru/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/sk/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/sl/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/sr/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/sv/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/sw/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/ta/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/te/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/th/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/tr/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/uk/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/vi/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/zh-CN/chrome_policy_list.html",
"$policy_templates_base_dir/common/html/zh-TW/chrome_policy_list.html",
]
policy_templates_linux_outputs =
[ "$policy_templates_base_dir/linux/examples/chrome.json" ]
policy_templates_mac_outputs = [
"$policy_templates_base_dir/ios/chrome_policy.plist",
"$policy_templates_base_dir/mac/app-Manifest.plist",
"$policy_templates_base_dir/mac/strings/am.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ar.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/bg.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/bn.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ca.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/cs.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/da.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/de.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/el.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/en.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/en_GB.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/es.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/es_419.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/et.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/fa.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/fi.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/fil.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/fr.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/gu.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/he.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/hi.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/hr.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/hu.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/id.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/it.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ja.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/kn.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ko.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/lt.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/lv.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ml.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/mr.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ms.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/nb.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/nl.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/pl.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/pt_BR.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/pt_PT.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ro.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ru.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/sk.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/sl.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/sr.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/sv.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/sw.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/ta.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/te.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/th.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/tr.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/uk.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/vi.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/zh_CN.lproj/Localizable.strings",
"$policy_templates_base_dir/mac/strings/zh_TW.lproj/Localizable.strings",
]
policy_templates_windows_outputs = [
"$policy_templates_base_dir/windows/adm/am/chrome.adm",
"$policy_templates_base_dir/windows/adm/ar/chrome.adm",
"$policy_templates_base_dir/windows/adm/bg/chrome.adm",
"$policy_templates_base_dir/windows/adm/bn/chrome.adm",
"$policy_templates_base_dir/windows/adm/ca/chrome.adm",
"$policy_templates_base_dir/windows/adm/cs/chrome.adm",
"$policy_templates_base_dir/windows/adm/da/chrome.adm",
"$policy_templates_base_dir/windows/adm/de/chrome.adm",
"$policy_templates_base_dir/windows/adm/el/chrome.adm",
"$policy_templates_base_dir/windows/adm/en-GB/chrome.adm",
"$policy_templates_base_dir/windows/adm/en-US/chrome.adm",
"$policy_templates_base_dir/windows/adm/es-419/chrome.adm",
"$policy_templates_base_dir/windows/adm/es/chrome.adm",
"$policy_templates_base_dir/windows/adm/et/chrome.adm",
"$policy_templates_base_dir/windows/adm/fa/chrome.adm",
"$policy_templates_base_dir/windows/adm/fi/chrome.adm",
"$policy_templates_base_dir/windows/adm/fil/chrome.adm",
"$policy_templates_base_dir/windows/adm/fr/chrome.adm",
"$policy_templates_base_dir/windows/adm/gu/chrome.adm",
"$policy_templates_base_dir/windows/adm/he/chrome.adm",
"$policy_templates_base_dir/windows/adm/hi/chrome.adm",
"$policy_templates_base_dir/windows/adm/hr/chrome.adm",
"$policy_templates_base_dir/windows/adm/hu/chrome.adm",
"$policy_templates_base_dir/windows/adm/id/chrome.adm",
"$policy_templates_base_dir/windows/adm/it/chrome.adm",
"$policy_templates_base_dir/windows/adm/ja/chrome.adm",
"$policy_templates_base_dir/windows/adm/kn/chrome.adm",
"$policy_templates_base_dir/windows/adm/ko/chrome.adm",
"$policy_templates_base_dir/windows/adm/lt/chrome.adm",
"$policy_templates_base_dir/windows/adm/lv/chrome.adm",
"$policy_templates_base_dir/windows/adm/ml/chrome.adm",
"$policy_templates_base_dir/windows/adm/mr/chrome.adm",
"$policy_templates_base_dir/windows/adm/ms/chrome.adm",
"$policy_templates_base_dir/windows/adm/nb/chrome.adm",
"$policy_templates_base_dir/windows/adm/nl/chrome.adm",
"$policy_templates_base_dir/windows/adm/pl/chrome.adm",
"$policy_templates_base_dir/windows/adm/pt-BR/chrome.adm",
"$policy_templates_base_dir/windows/adm/pt-PT/chrome.adm",
"$policy_templates_base_dir/windows/adm/ro/chrome.adm",
"$policy_templates_base_dir/windows/adm/ru/chrome.adm",
"$policy_templates_base_dir/windows/adm/sk/chrome.adm",
"$policy_templates_base_dir/windows/adm/sl/chrome.adm",
"$policy_templates_base_dir/windows/adm/sr/chrome.adm",
"$policy_templates_base_dir/windows/adm/sv/chrome.adm",
"$policy_templates_base_dir/windows/adm/sw/chrome.adm",
"$policy_templates_base_dir/windows/adm/ta/chrome.adm",
"$policy_templates_base_dir/windows/adm/te/chrome.adm",
"$policy_templates_base_dir/windows/adm/th/chrome.adm",
"$policy_templates_base_dir/windows/adm/tr/chrome.adm",
"$policy_templates_base_dir/windows/adm/uk/chrome.adm",
"$policy_templates_base_dir/windows/adm/vi/chrome.adm",
"$policy_templates_base_dir/windows/adm/zh-CN/chrome.adm",
"$policy_templates_base_dir/windows/adm/zh-TW/chrome.adm",
"$policy_templates_base_dir/windows/admx/am/chrome.adml",
"$policy_templates_base_dir/windows/admx/ar/chrome.adml",
"$policy_templates_base_dir/windows/admx/bg/chrome.adml",
"$policy_templates_base_dir/windows/admx/bn/chrome.adml",
"$policy_templates_base_dir/windows/admx/ca/chrome.adml",
"$policy_templates_base_dir/windows/admx/chrome.admx",
"$policy_templates_base_dir/windows/admx/cs/chrome.adml",
"$policy_templates_base_dir/windows/admx/da/chrome.adml",
"$policy_templates_base_dir/windows/admx/de/chrome.adml",
"$policy_templates_base_dir/windows/admx/el/chrome.adml",
"$policy_templates_base_dir/windows/admx/en-GB/chrome.adml",
"$policy_templates_base_dir/windows/admx/en-US/chrome.adml",
"$policy_templates_base_dir/windows/admx/es-419/chrome.adml",
"$policy_templates_base_dir/windows/admx/es/chrome.adml",
"$policy_templates_base_dir/windows/admx/et/chrome.adml",
"$policy_templates_base_dir/windows/admx/fa/chrome.adml",
"$policy_templates_base_dir/windows/admx/fi/chrome.adml",
"$policy_templates_base_dir/windows/admx/fil/chrome.adml",
"$policy_templates_base_dir/windows/admx/fr/chrome.adml",
"$policy_templates_base_dir/windows/admx/gu/chrome.adml",
"$policy_templates_base_dir/windows/admx/he/chrome.adml",
"$policy_templates_base_dir/windows/admx/hi/chrome.adml",
"$policy_templates_base_dir/windows/admx/hr/chrome.adml",
"$policy_templates_base_dir/windows/admx/hu/chrome.adml",
"$policy_templates_base_dir/windows/admx/id/chrome.adml",
"$policy_templates_base_dir/windows/admx/it/chrome.adml",
"$policy_templates_base_dir/windows/admx/ja/chrome.adml",
"$policy_templates_base_dir/windows/admx/kn/chrome.adml",
"$policy_templates_base_dir/windows/admx/ko/chrome.adml",
"$policy_templates_base_dir/windows/admx/lt/chrome.adml",
"$policy_templates_base_dir/windows/admx/lv/chrome.adml",
"$policy_templates_base_dir/windows/admx/ml/chrome.adml",
"$policy_templates_base_dir/windows/admx/mr/chrome.adml",
"$policy_templates_base_dir/windows/admx/ms/chrome.adml",
"$policy_templates_base_dir/windows/admx/nb/chrome.adml",
"$policy_templates_base_dir/windows/admx/nl/chrome.adml",
"$policy_templates_base_dir/windows/admx/pl/chrome.adml",
"$policy_templates_base_dir/windows/admx/pt-BR/chrome.adml",
"$policy_templates_base_dir/windows/admx/pt-PT/chrome.adml",
"$policy_templates_base_dir/windows/admx/ro/chrome.adml",
"$policy_templates_base_dir/windows/admx/ru/chrome.adml",
"$policy_templates_base_dir/windows/admx/sk/chrome.adml",
"$policy_templates_base_dir/windows/admx/sl/chrome.adml",
"$policy_templates_base_dir/windows/admx/sr/chrome.adml",
"$policy_templates_base_dir/windows/admx/sv/chrome.adml",
"$policy_templates_base_dir/windows/admx/sw/chrome.adml",
"$policy_templates_base_dir/windows/admx/ta/chrome.adml",
"$policy_templates_base_dir/windows/admx/te/chrome.adml",
"$policy_templates_base_dir/windows/admx/th/chrome.adml",
"$policy_templates_base_dir/windows/admx/tr/chrome.adml",
"$policy_templates_base_dir/windows/admx/uk/chrome.adml",
"$policy_templates_base_dir/windows/admx/vi/chrome.adml",
"$policy_templates_base_dir/windows/admx/zh-CN/chrome.adml",
"$policy_templates_base_dir/windows/admx/zh-TW/chrome.adml",
"$policy_templates_base_dir/windows/examples/chrome.reg",
]
...@@ -6,7 +6,60 @@ templates and will be translated for each locale. --> ...@@ -6,7 +6,60 @@ templates and will be translated for each locale. -->
<grit base_dir="." latest_public_release="0" current_release="1" <grit base_dir="." latest_public_release="0" current_release="1"
source_lang_id="en" enc_check="möl"> source_lang_id="en" enc_check="möl">
<outputs> <outputs>
<output filename="app/policy/linux/examples/chrome.json" type="json" lang="en" /> <output filename="app/policy/common/html/am/chrome_policy_list.html" type="doc" lang="am" />
<output filename="app/policy/common/html/ar/chrome_policy_list.html" type="doc" lang="ar" />
<output filename="app/policy/common/html/bg/chrome_policy_list.html" type="doc" lang="bg" />
<output filename="app/policy/common/html/bn/chrome_policy_list.html" type="doc" lang="bn" />
<output filename="app/policy/common/html/ca/chrome_policy_list.html" type="doc" lang="ca" />
<output filename="app/policy/common/html/cs/chrome_policy_list.html" type="doc" lang="cs" />
<output filename="app/policy/common/html/da/chrome_policy_list.html" type="doc" lang="da" />
<output filename="app/policy/common/html/de/chrome_policy_list.html" type="doc" lang="de" />
<output filename="app/policy/common/html/el/chrome_policy_list.html" type="doc" lang="el" />
<output filename="app/policy/common/html/en-GB/chrome_policy_list.html" type="doc" lang="en-GB" />
<output filename="app/policy/common/html/en-US/chrome_policy_list.html" type="doc" lang="en" />
<output filename="app/policy/common/html/es/chrome_policy_list.html" type="doc" lang="es" />
<output filename="app/policy/common/html/es-419/chrome_policy_list.html" type="doc" lang="es-419" />
<output filename="app/policy/common/html/et/chrome_policy_list.html" type="doc" lang="et" />
<output filename="app/policy/common/html/fa/chrome_policy_list.html" type="doc" lang="fa" />
<output filename="app/policy/common/html/fi/chrome_policy_list.html" type="doc" lang="fi" />
<output filename="app/policy/common/html/fil/chrome_policy_list.html" type="doc" lang="fil" />
<output filename="app/policy/common/html/fr/chrome_policy_list.html" type="doc" lang="fr" />
<output filename="app/policy/common/html/gu/chrome_policy_list.html" type="doc" lang="gu" />
<output filename="app/policy/common/html/he/chrome_policy_list.html" type="doc" lang="he" />
<output filename="app/policy/common/html/hi/chrome_policy_list.html" type="doc" lang="hi" />
<output filename="app/policy/common/html/hr/chrome_policy_list.html" type="doc" lang="hr" />
<output filename="app/policy/common/html/hu/chrome_policy_list.html" type="doc" lang="hu" />
<output filename="app/policy/common/html/id/chrome_policy_list.html" type="doc" lang="id" />
<output filename="app/policy/common/html/it/chrome_policy_list.html" type="doc" lang="it" />
<output filename="app/policy/common/html/ja/chrome_policy_list.html" type="doc" lang="ja" />
<output filename="app/policy/common/html/kn/chrome_policy_list.html" type="doc" lang="kn" />
<output filename="app/policy/common/html/ko/chrome_policy_list.html" type="doc" lang="ko" />
<output filename="app/policy/common/html/lt/chrome_policy_list.html" type="doc" lang="lt" />
<output filename="app/policy/common/html/lv/chrome_policy_list.html" type="doc" lang="lv" />
<output filename="app/policy/common/html/ml/chrome_policy_list.html" type="doc" lang="ml" />
<output filename="app/policy/common/html/mr/chrome_policy_list.html" type="doc" lang="mr" />
<output filename="app/policy/common/html/ms/chrome_policy_list.html" type="doc" lang="ms" />
<output filename="app/policy/common/html/nl/chrome_policy_list.html" type="doc" lang="nl" />
<output filename="app/policy/common/html/nb/chrome_policy_list.html" type="doc" lang="no" />
<!-- 'no' for Norwegian Bokmål. It should be 'nb'. -->
<output filename="app/policy/common/html/pl/chrome_policy_list.html" type="doc" lang="pl" />
<output filename="app/policy/common/html/pt-BR/chrome_policy_list.html" type="doc" lang="pt-BR" />
<output filename="app/policy/common/html/pt-PT/chrome_policy_list.html" type="doc" lang="pt-PT" />
<output filename="app/policy/common/html/ro/chrome_policy_list.html" type="doc" lang="ro" />
<output filename="app/policy/common/html/ru/chrome_policy_list.html" type="doc" lang="ru" />
<output filename="app/policy/common/html/sk/chrome_policy_list.html" type="doc" lang="sk" />
<output filename="app/policy/common/html/sl/chrome_policy_list.html" type="doc" lang="sl" />
<output filename="app/policy/common/html/sr/chrome_policy_list.html" type="doc" lang="sr" />
<output filename="app/policy/common/html/sv/chrome_policy_list.html" type="doc" lang="sv" />
<output filename="app/policy/common/html/sw/chrome_policy_list.html" type="doc" lang="sw" />
<output filename="app/policy/common/html/ta/chrome_policy_list.html" type="doc" lang="ta" />
<output filename="app/policy/common/html/te/chrome_policy_list.html" type="doc" lang="te" />
<output filename="app/policy/common/html/th/chrome_policy_list.html" type="doc" lang="th" />
<output filename="app/policy/common/html/tr/chrome_policy_list.html" type="doc" lang="tr" />
<output filename="app/policy/common/html/uk/chrome_policy_list.html" type="doc" lang="uk" />
<output filename="app/policy/common/html/vi/chrome_policy_list.html" type="doc" lang="vi" />
<output filename="app/policy/common/html/zh-CN/chrome_policy_list.html" type="doc" lang="zh-CN" />
<output filename="app/policy/common/html/zh-TW/chrome_policy_list.html" type="doc" lang="zh-TW" />
<if expr="is_win"> <if expr="is_win">
<output filename="app/policy/windows/examples/chrome.reg" type="reg" lang="en" /> <output filename="app/policy/windows/examples/chrome.reg" type="reg" lang="en" />
<output filename="app/policy/windows/admx/chrome.admx" type="admx" lang="en" /> <output filename="app/policy/windows/admx/chrome.admx" type="admx" lang="en" />
...@@ -121,62 +174,65 @@ templates and will be translated for each locale. --> ...@@ -121,62 +174,65 @@ templates and will be translated for each locale. -->
<output filename="app/policy/windows/adm/zh-CN/chrome.adm" type="adm" lang="zh-CN" /> <output filename="app/policy/windows/adm/zh-CN/chrome.adm" type="adm" lang="zh-CN" />
<output filename="app/policy/windows/adm/zh-TW/chrome.adm" type="adm" lang="zh-TW" /> <output filename="app/policy/windows/adm/zh-TW/chrome.adm" type="adm" lang="zh-TW" />
</if> </if>
<if expr="is_linux">
<output filename="app/policy/common/html/am/chrome_policy_list.html" type="doc" lang="am" /> <output filename="app/policy/linux/examples/chrome.json" type="json" lang="en" />
<output filename="app/policy/common/html/ar/chrome_policy_list.html" type="doc" lang="ar" /> </if>
<output filename="app/policy/common/html/bg/chrome_policy_list.html" type="doc" lang="bg" /> <if expr="is_android">
<output filename="app/policy/common/html/bn/chrome_policy_list.html" type="doc" lang="bn" /> <output filename="app/policy/android/values-am-v21/restriction_values.xml" type="android_policy" lang="am" />
<output filename="app/policy/common/html/ca/chrome_policy_list.html" type="doc" lang="ca" /> <output filename="app/policy/android/values-ar-v21/restriction_values.xml" type="android_policy" lang="ar" />
<output filename="app/policy/common/html/cs/chrome_policy_list.html" type="doc" lang="cs" /> <output filename="app/policy/android/values-bg-v21/restriction_values.xml" type="android_policy" lang="bg" />
<output filename="app/policy/common/html/da/chrome_policy_list.html" type="doc" lang="da" /> <output filename="app/policy/android/values-bn-v21/restriction_values.xml" type="android_policy" lang="bn" />
<output filename="app/policy/common/html/de/chrome_policy_list.html" type="doc" lang="de" /> <output filename="app/policy/android/values-ca-v21/restriction_values.xml" type="android_policy" lang="ca" />
<output filename="app/policy/common/html/el/chrome_policy_list.html" type="doc" lang="el" /> <output filename="app/policy/android/values-cs-v21/restriction_values.xml" type="android_policy" lang="cs" />
<output filename="app/policy/common/html/en-GB/chrome_policy_list.html" type="doc" lang="en-GB" /> <output filename="app/policy/android/values-da-v21/restriction_values.xml" type="android_policy" lang="da" />
<output filename="app/policy/common/html/en-US/chrome_policy_list.html" type="doc" lang="en" /> <output filename="app/policy/android/values-de-v21/restriction_values.xml" type="android_policy" lang="de" />
<output filename="app/policy/common/html/es/chrome_policy_list.html" type="doc" lang="es" /> <output filename="app/policy/android/values-el-v21/restriction_values.xml" type="android_policy" lang="el" />
<output filename="app/policy/common/html/es-419/chrome_policy_list.html" type="doc" lang="es-419" /> <output filename="app/policy/android/values-en-rGB-v21/restriction_values.xml" type="android_policy" lang="en-GB" />
<output filename="app/policy/common/html/et/chrome_policy_list.html" type="doc" lang="et" /> <output filename="app/policy/android/values-v21/restriction_values.xml" type="android_policy" lang="en" />
<output filename="app/policy/common/html/fa/chrome_policy_list.html" type="doc" lang="fa" /> <output filename="app/policy/android/values-es-rES-v21/restriction_values.xml" type="android_policy" lang="es" />
<output filename="app/policy/common/html/fi/chrome_policy_list.html" type="doc" lang="fi" /> <output filename="app/policy/android/values-es-v21/restriction_values.xml" type="android_policy" lang="es-419" />
<output filename="app/policy/common/html/fil/chrome_policy_list.html" type="doc" lang="fil" /> <output filename="app/policy/android/values-et-v21/restriction_values.xml" type="android_policy" lang="et" />
<output filename="app/policy/common/html/fr/chrome_policy_list.html" type="doc" lang="fr" /> <output filename="app/policy/android/values-fa-v21/restriction_values.xml" type="android_policy" lang="fa" />
<output filename="app/policy/common/html/gu/chrome_policy_list.html" type="doc" lang="gu" /> <output filename="app/policy/android/values-fi-v21/restriction_values.xml" type="android_policy" lang="fi" />
<output filename="app/policy/common/html/he/chrome_policy_list.html" type="doc" lang="he" /> <output filename="app/policy/android/values-fil-v21/restriction_values.xml" type="android_policy" lang="fil" />
<output filename="app/policy/common/html/hi/chrome_policy_list.html" type="doc" lang="hi" /> <output filename="app/policy/android/values-fr-v21/restriction_values.xml" type="android_policy" lang="fr" />
<output filename="app/policy/common/html/hr/chrome_policy_list.html" type="doc" lang="hr" /> <output filename="app/policy/android/values-gu-v21/restriction_values.xml" type="android_policy" lang="gu" />
<output filename="app/policy/common/html/hu/chrome_policy_list.html" type="doc" lang="hu" /> <output filename="app/policy/android/values-he-v21/restriction_values.xml" type="android_policy" lang="he" />
<output filename="app/policy/common/html/id/chrome_policy_list.html" type="doc" lang="id" /> <output filename="app/policy/android/values-hi-v21/restriction_values.xml" type="android_policy" lang="hi" />
<output filename="app/policy/common/html/it/chrome_policy_list.html" type="doc" lang="it" /> <output filename="app/policy/android/values-hr-v21/restriction_values.xml" type="android_policy" lang="hr" />
<output filename="app/policy/common/html/ja/chrome_policy_list.html" type="doc" lang="ja" /> <output filename="app/policy/android/values-hu-v21/restriction_values.xml" type="android_policy" lang="hu" />
<output filename="app/policy/common/html/kn/chrome_policy_list.html" type="doc" lang="kn" /> <output filename="app/policy/android/values-id-v21/restriction_values.xml" type="android_policy" lang="id" />
<output filename="app/policy/common/html/ko/chrome_policy_list.html" type="doc" lang="ko" /> <output filename="app/policy/android/values-it-v21/restriction_values.xml" type="android_policy" lang="it" />
<output filename="app/policy/common/html/lt/chrome_policy_list.html" type="doc" lang="lt" /> <output filename="app/policy/android/values-ja-v21/restriction_values.xml" type="android_policy" lang="ja" />
<output filename="app/policy/common/html/lv/chrome_policy_list.html" type="doc" lang="lv" /> <output filename="app/policy/android/values-kn-v21/restriction_values.xml" type="android_policy" lang="kn" />
<output filename="app/policy/common/html/ml/chrome_policy_list.html" type="doc" lang="ml" /> <output filename="app/policy/android/values-ko-v21/restriction_values.xml" type="android_policy" lang="ko" />
<output filename="app/policy/common/html/mr/chrome_policy_list.html" type="doc" lang="mr" /> <output filename="app/policy/android/values-lt-v21/restriction_values.xml" type="android_policy" lang="lt" />
<output filename="app/policy/common/html/ms/chrome_policy_list.html" type="doc" lang="ms" /> <output filename="app/policy/android/values-lv-v21/restriction_values.xml" type="android_policy" lang="lv" />
<output filename="app/policy/common/html/nl/chrome_policy_list.html" type="doc" lang="nl" /> <output filename="app/policy/android/values-ml-v21/restriction_values.xml" type="android_policy" lang="ml" />
<output filename="app/policy/common/html/nb/chrome_policy_list.html" type="doc" lang="no" /> <output filename="app/policy/android/values-mr-v21/restriction_values.xml" type="android_policy" lang="mr" />
<output filename="app/policy/android/values-ms-v21/restriction_values.xml" type="android_policy" lang="ms" />
<output filename="app/policy/android/values-nl-v21/restriction_values.xml" type="android_policy" lang="nl" />
<output filename="app/policy/android/values-nb-v21/restriction_values.xml" type="android_policy" lang="no" />
<!-- 'no' for Norwegian Bokmål. It should be 'nb'. --> <!-- 'no' for Norwegian Bokmål. It should be 'nb'. -->
<output filename="app/policy/common/html/pl/chrome_policy_list.html" type="doc" lang="pl" /> <output filename="app/policy/android/values-pl-v21/restriction_values.xml" type="android_policy" lang="pl" />
<output filename="app/policy/common/html/pt-BR/chrome_policy_list.html" type="doc" lang="pt-BR" /> <output filename="app/policy/android/values-pt-rBR-v21/restriction_values.xml" type="android_policy" lang="pt-BR" />
<output filename="app/policy/common/html/pt-PT/chrome_policy_list.html" type="doc" lang="pt-PT" /> <output filename="app/policy/android/values-pt-rPT-v21/restriction_values.xml" type="android_policy" lang="pt-PT" />
<output filename="app/policy/common/html/ro/chrome_policy_list.html" type="doc" lang="ro" /> <output filename="app/policy/android/values-ro-v21/restriction_values.xml" type="android_policy" lang="ro" />
<output filename="app/policy/common/html/ru/chrome_policy_list.html" type="doc" lang="ru" /> <output filename="app/policy/android/values-ru-v21/restriction_values.xml" type="android_policy" lang="ru" />
<output filename="app/policy/common/html/sk/chrome_policy_list.html" type="doc" lang="sk" /> <output filename="app/policy/android/values-sk-v21/restriction_values.xml" type="android_policy" lang="sk" />
<output filename="app/policy/common/html/sl/chrome_policy_list.html" type="doc" lang="sl" /> <output filename="app/policy/android/values-sl-v21/restriction_values.xml" type="android_policy" lang="sl" />
<output filename="app/policy/common/html/sr/chrome_policy_list.html" type="doc" lang="sr" /> <output filename="app/policy/android/values-sr-v21/restriction_values.xml" type="android_policy" lang="sr" />
<output filename="app/policy/common/html/sv/chrome_policy_list.html" type="doc" lang="sv" /> <output filename="app/policy/android/values-sv-v21/restriction_values.xml" type="android_policy" lang="sv" />
<output filename="app/policy/common/html/sw/chrome_policy_list.html" type="doc" lang="sw" /> <output filename="app/policy/android/values-sw-v21/restriction_values.xml" type="android_policy" lang="sw" />
<output filename="app/policy/common/html/ta/chrome_policy_list.html" type="doc" lang="ta" /> <output filename="app/policy/android/values-ta-v21/restriction_values.xml" type="android_policy" lang="ta" />
<output filename="app/policy/common/html/te/chrome_policy_list.html" type="doc" lang="te" /> <output filename="app/policy/android/values-te-v21/restriction_values.xml" type="android_policy" lang="te" />
<output filename="app/policy/common/html/th/chrome_policy_list.html" type="doc" lang="th" /> <output filename="app/policy/android/values-th-v21/restriction_values.xml" type="android_policy" lang="th" />
<output filename="app/policy/common/html/tr/chrome_policy_list.html" type="doc" lang="tr" /> <output filename="app/policy/android/values-tr-v21/restriction_values.xml" type="android_policy" lang="tr" />
<output filename="app/policy/common/html/uk/chrome_policy_list.html" type="doc" lang="uk" /> <output filename="app/policy/android/values-uk-v21/restriction_values.xml" type="android_policy" lang="uk" />
<output filename="app/policy/common/html/vi/chrome_policy_list.html" type="doc" lang="vi" /> <output filename="app/policy/android/values-vi-v21/restriction_values.xml" type="android_policy" lang="vi" />
<output filename="app/policy/common/html/zh-CN/chrome_policy_list.html" type="doc" lang="zh-CN" /> <output filename="app/policy/android/values-zh-rCN-v21/restriction_values.xml" type="android_policy" lang="zh-CN" />
<output filename="app/policy/common/html/zh-TW/chrome_policy_list.html" type="doc" lang="zh-TW" /> <output filename="app/policy/android/values-zh-rTW-v21/restriction_values.xml" type="android_policy" lang="zh-TW" />
</if>
<if expr="is_macosx"> <if expr="is_macosx">
<output filename="app/policy/mac/app-Manifest.plist" type="plist" lang="en" /> <output filename="app/policy/mac/app-Manifest.plist" type="plist" lang="en" />
...@@ -240,7 +296,6 @@ templates and will be translated for each locale. --> ...@@ -240,7 +296,6 @@ templates and will be translated for each locale. -->
<!-- Generate the sample iOS plist when building the templates for the Mac. --> <!-- Generate the sample iOS plist when building the templates for the Mac. -->
<output filename="app/policy/ios/chrome_policy.plist" type="ios_plist" lang="en" /> <output filename="app/policy/ios/chrome_policy.plist" type="ios_plist" lang="en" />
</if> </if>
</outputs> </outputs>
<translations> <translations>
<file path="policy_templates_am.xtb" lang="am" /> <file path="policy_templates_am.xtb" lang="am" />
......
...@@ -7327,6 +7327,10 @@ ...@@ -7327,6 +7327,10 @@
'desc': '''Caption text of the field 'mac/linux preference name' in the summary chart of a policy in the generated documentation''', 'desc': '''Caption text of the field 'mac/linux preference name' in the summary chart of a policy in the generated documentation''',
'text': '''Mac/Linux preference name:''' 'text': '''Mac/Linux preference name:'''
}, },
'doc_android_restriction_name': {
'desc': '''Caption text of the field 'android restriction name' in the summary chart of a policy in the generated documentation''',
'text': '''Android restriction name:'''
},
'doc_supported_on': { 'doc_supported_on': {
'desc': '''Caption text of the list of 'products, platforms and versions where this policy is supported' in the summary chart of a policy in the generated documentation''', 'desc': '''Caption text of the list of 'products, platforms and versions where this policy is supported' in the summary chart of a policy in the generated documentation''',
'text': '''Supported on:''' 'text': '''Supported on:'''
......
...@@ -28,34 +28,33 @@ CHROMIUM_POLICY_KEY = 'SOFTWARE\\\\Policies\\\\Chromium' ...@@ -28,34 +28,33 @@ CHROMIUM_POLICY_KEY = 'SOFTWARE\\\\Policies\\\\Chromium'
class PolicyDetails: class PolicyDetails:
"""Parses a policy template and caches all its details.""" """Parses a policy template and caches all its details."""
# Maps policy types to a tuple with 5 other types: # Maps policy types to a tuple with 4 other types:
# - the equivalent base::Value::Type or 'TYPE_EXTERNAL' if the policy # - the equivalent base::Value::Type or 'TYPE_EXTERNAL' if the policy
# references external data # references external data
# - the equivalent Protobuf field type # - the equivalent Protobuf field type
# - the name of one of the protobufs for shared policy types # - the name of one of the protobufs for shared policy types
# - the equivalent type in Android's App Restriction Schema # - the equivalent type in Android's App Restriction Schema
# - whether the equivalent app restriction type needs supporting resources
# TODO(joaodasilva): refactor the 'dict' type into a more generic 'json' type # TODO(joaodasilva): refactor the 'dict' type into a more generic 'json' type
# that can also be used to represent lists of other JSON objects. # that can also be used to represent lists of other JSON objects.
TYPE_MAP = { TYPE_MAP = {
'dict': ('TYPE_DICTIONARY', 'string', 'String', 'dict': ('TYPE_DICTIONARY', 'string', 'String',
'string', False), 'string'),
'external': ('TYPE_EXTERNAL', 'string', 'String', 'external': ('TYPE_EXTERNAL', 'string', 'String',
'invalid', False), 'invalid'),
'int': ('TYPE_INTEGER', 'int64', 'Integer', 'int': ('TYPE_INTEGER', 'int64', 'Integer',
'integer', False), 'integer'),
'int-enum': ('TYPE_INTEGER', 'int64', 'Integer', 'int-enum': ('TYPE_INTEGER', 'int64', 'Integer',
'choice', True), 'choice'),
'list': ('TYPE_LIST', 'StringList', 'StringList', 'list': ('TYPE_LIST', 'StringList', 'StringList',
'string', False), 'string'),
'main': ('TYPE_BOOLEAN', 'bool', 'Boolean', 'main': ('TYPE_BOOLEAN', 'bool', 'Boolean',
'bool', False), 'bool'),
'string': ('TYPE_STRING', 'string', 'String', 'string': ('TYPE_STRING', 'string', 'String',
'string', False), 'string'),
'string-enum': ('TYPE_STRING', 'string', 'String', 'string-enum': ('TYPE_STRING', 'string', 'String',
'choice', True), 'choice'),
'string-enum-list': ('TYPE_LIST', 'StringList', 'StringList', 'string-enum-list': ('TYPE_LIST', 'StringList', 'StringList',
'multi-select', True), 'multi-select'),
} }
class EnumItem: class EnumItem:
...@@ -98,8 +97,7 @@ class PolicyDetails: ...@@ -98,8 +97,7 @@ class PolicyDetails:
raise NotImplementedError('Unknown policy type for %s: %s' % raise NotImplementedError('Unknown policy type for %s: %s' %
(policy['name'], policy['type'])) (policy['name'], policy['type']))
self.policy_type, self.protobuf_type, self.policy_protobuf_type, \ self.policy_type, self.protobuf_type, self.policy_protobuf_type, \
self.restriction_type, self.has_restriction_resources = \ self.restriction_type = PolicyDetails.TYPE_MAP[policy['type']]
PolicyDetails.TYPE_MAP[policy['type']]
self.schema = policy['schema'] self.schema = policy['schema']
self.desc = '\n'.join( self.desc = '\n'.join(
...@@ -154,12 +152,6 @@ def main(): ...@@ -154,12 +152,6 @@ def main():
help='generate an XML file as specified by ' help='generate an XML file as specified by '
'Android\'s App Restriction Schema', 'Android\'s App Restriction Schema',
metavar='FILE') metavar='FILE')
parser.add_option('--arr', '--app-restrictions-resources',
dest='app_resources_path',
help='generate an XML file with resources supporting the '
'restrictions defined in --app-restrictions-definition '
'parameter',
metavar='FILE')
(opts, args) = parser.parse_args() (opts, args) = parser.parse_args()
...@@ -191,7 +183,6 @@ def main(): ...@@ -191,7 +183,6 @@ def main():
if os == 'android': if os == 'android':
GenerateFile(opts.app_restrictions_path, _WriteAppRestrictions, xml=True) GenerateFile(opts.app_restrictions_path, _WriteAppRestrictions, xml=True)
GenerateFile(opts.app_resources_path, _WriteResourcesForPolicies, xml=True)
return 0 return 0
...@@ -1007,14 +998,6 @@ def _WriteCloudPolicyDecoder(policies, os, f): ...@@ -1007,14 +998,6 @@ def _WriteCloudPolicyDecoder(policies, os, f):
f.write(CPP_FOOT) f.write(CPP_FOOT)
def _EscapeResourceString(raw_resource):
if type(raw_resource) == int:
return raw_resource
return xml_escape(raw_resource)\
.replace('\\', '\\\\')\
.replace('\"','\\\"')\
.replace('\'','\\\'')
def _WriteAppRestrictions(policies, os, f): def _WriteAppRestrictions(policies, os, f):
def WriteRestrictionCommon(key): def WriteRestrictionCommon(key):
...@@ -1031,7 +1014,7 @@ def _WriteAppRestrictions(policies, os, f): ...@@ -1031,7 +1014,7 @@ def _WriteAppRestrictions(policies, os, f):
policy_name = policy.name policy_name = policy.name
WriteRestrictionCommon(policy_name) WriteRestrictionCommon(policy_name)
if policy.has_restriction_resources: if policy.items is not None:
WriteItemsDefinition(policy_name) WriteItemsDefinition(policy_name)
f.write(' android:restrictionType="%s"/>' % policy.restriction_type) f.write(' android:restrictionType="%s"/>' % policy.restriction_type)
...@@ -1045,44 +1028,5 @@ def _WriteAppRestrictions(policies, os, f): ...@@ -1045,44 +1028,5 @@ def _WriteAppRestrictions(policies, os, f):
WriteAppRestriction(policy) WriteAppRestriction(policy)
f.write('</restrictions>') f.write('</restrictions>')
def _WriteResourcesForPolicies(policies, os, f):
# TODO(knn): Update this to support i18n.
def WriteString(key, value):
f.write(' <string name="%s">%s</string>\n'
% (key, _EscapeResourceString(value)))
def WriteItems(key, items):
if items:
f.write(' <string-array name="%sEntries">\n' % key)
for item in items:
f.write(' <item>%s</item>\n' %
_EscapeResourceString(item.caption))
f.write(' </string-array>\n')
f.write(' <string-array name="%sValues">\n' % key)
for item in items:
f.write(' <item>%s</item>\n' % _EscapeResourceString(item.value))
f.write(' </string-array>\n')
def WriteResourceForPolicy(policy):
policy_name = policy.name
WriteString(policy_name + 'Title', policy.caption)
# Get the first line of the policy description.
description = policy.desc.split('\n', 1)[0]
WriteString(policy_name + 'Desc', description)
if policy.has_restriction_resources:
WriteItems(policy_name, policy.items)
# _WriteResourcesForPolicies body
f.write('<resources>\n\n')
for policy in policies:
if policy.is_supported and policy.restriction_type != 'invalid':
WriteResourceForPolicy(policy)
f.write('</resources>')
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(main()) sys.exit(main())
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