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

Unified Diff: components/policy/BUILD.gn

Issue 2509243003: Split off 'Google' category into separate ADMX/ADML files (Closed)
Patch Set: rebase 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: components/policy/BUILD.gn
diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn
index 987142b4dbff1a87b46332fe56bc8b394cd40098..cfc1b0ef31c2caa7004b30b2947ebdd13eff8552 100644
--- a/components/policy/BUILD.gn
+++ b/components/policy/BUILD.gn
@@ -111,6 +111,31 @@ if (enable_configuration_policy) {
}
policy_templates_grd_file = "resources/policy_templates.grd"
+
+ if (is_chrome_branded) {
+ # Creates google.admx and google.adml files that define a common 'Google'
+ # category used for Chrome, Chrome OS and possibly external tools, see
+ # crbug.com/665400.
+ action("create_google_admx") {
+ script = "tools/create_google_admx.py"
+ outputs = policy_templates_windows_google_outputs
+
+ # Don't pass in outputs directly, it would exceed a limit on Windows!
+ args = [
+ "--basedir",
+ rebase_path(policy_templates_base_dir, root_build_dir),
Nico 2016/11/18 17:27:16 Are the files in this directory used as input? If
ljusten (tachyonic) 2016/11/19 17:12:35 It defines the output path. Thanks for the tip wit
+ "--grd_strip_path_prefix",
+ "app/policy/",
+ "--grd_input",
+ rebase_path(policy_templates_grd_file, root_build_dir),
Nico 2016/11/18 17:27:16 this should probably be listed as an input then?
ljusten (tachyonic) 2016/11/19 17:12:35 Yes, you're right! Thanks.
+ "--grit_info",
+ rebase_path(grit_info_script, root_build_dir),
+ "-D",
+ "gen_policy_templates_win",
+ ] + grit_defines
+ }
+ }
+
grit("policy_templates") {
source = policy_templates_grd_file
use_qualified_include = true
@@ -141,6 +166,11 @@ if (enable_configuration_policy) {
outputs += policy_templates_windows_outputs
defines += [ "gen_policy_templates_win" ]
}
+ if (is_chrome_branded) {
+ deps = [
+ ":create_google_admx",
+ ]
+ }
}
# Run the proto compiler over the generated file and make it a component.
@@ -345,6 +375,11 @@ if (enable_configuration_policy) {
":add_version",
":policy_templates",
]
+ if (is_chrome_branded) {
+ inputs += policy_templates_windows_google_outputs
+ deps += [ ":create_google_admx" ]
+ args += [ "--include_google_admx" ]
+ }
}
}
}
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.gni » ('j') | components/policy/tools/create_google_admx.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698