Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: tools/grit/grit/format/policy_templates/writer_configuration.py

Issue 2509243003: Split off 'Google' category into separate ADMX/ADML files (Closed)
Patch Set: Android build fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/grit/grit/format/policy_templates/writer_configuration.py
diff --git a/tools/grit/grit/format/policy_templates/writer_configuration.py b/tools/grit/grit/format/policy_templates/writer_configuration.py
index bd276d23a0d89a7012aa8dbc6c4a7b0be8ef2885..728a3cf09e4835b1cd8ccd497d02e2785a0da58d 100755
--- a/tools/grit/grit/format/policy_templates/writer_configuration.py
+++ b/tools/grit/grit/format/policy_templates/writer_configuration.py
@@ -19,6 +19,7 @@ def GetConfigurationForBuild(defines):
# win: Both ADM and ADMX.
# mac: Only plist.
# admx: Only ADMX.
+ # adm: Only ADM.
# none/other: Used by all the writers.
if '_chromium' in defines:
config = {
@@ -32,6 +33,10 @@ def GetConfigurationForBuild(defines):
'Software\\Policies\\Chromium\\Recommended',
'win_mandatory_category_path': ['chromium'],
'win_recommended_category_path': ['chromium_recommended'],
+ 'win_category_path_strings': {
+ 'chromium': 'Chromium',
+ 'chromium_recommended': 'Chromium - {doc_recommended}'
+ },
'admx_namespace': 'Chromium.Policies.Chromium',
'admx_prefix': 'chromium',
'linux_policy_path': '/etc/chromium/policies/',
@@ -46,10 +51,25 @@ def GetConfigurationForBuild(defines):
'win_reg_mandatory_key_name': 'Software\\Policies\\Google\\Chrome',
'win_reg_recommended_key_name':
'Software\\Policies\\Google\\Chrome\\Recommended',
- 'win_mandatory_category_path': ['google', 'googlechrome'],
- 'win_recommended_category_path': ['google', 'googlechrome_recommended'],
+ # Note: Google:Cat_Google references Google.Policies from external
+ # in google.admx file.
+ 'win_mandatory_category_path': ['Google:Cat_Google', 'googlechrome'],
+ 'win_recommended_category_path':
+ ['Google:Cat_Google', 'googlechrome_recommended'],
+ 'win_category_path_strings': {
+ # Strings in curly braces is looked up from localized 'messages' in
+ # policy_templates.json.
+ 'googlechrome': 'Google Chrome',
+ 'googlechrome_recommended': 'Google Chrome - {doc_recommended}'
+ },
+ # The string 'Google' is defined in google.adml for ADMX, but ADM doesn't
+ # support external references, so we define this map here.
+ 'adm_category_path_strings': { 'Google:Cat_Google': 'Google' },
'admx_namespace': 'Google.Policies.Chrome',
'admx_prefix': 'chrome',
+ 'admx_using_namespaces': {
+ 'Google': 'Google.Policies' # prefix: namespace
+ },
'linux_policy_path': '/etc/opt/chrome/policies/',
}
else:
« no previous file with comments | « components/policy/tools/make_policy_zip.py ('k') | tools/grit/grit/format/policy_templates/writers/adm_writer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698