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

Unified Diff: components/policy/BUILD.gn

Issue 2481183002: Generate ADMX template for Chrome OS policies (Closed)
Patch Set: Couple of fixes after testing Created 3 years, 3 months 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
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/BUILD.gn
diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn
index 2b9eaa72d48a9175687b3fadb545d5a202b35665..42758e8f4348758b2dfd4c465e3bf094bd36724e 100644
--- a/components/policy/BUILD.gn
+++ b/components/policy/BUILD.gn
@@ -18,6 +18,17 @@ gen_policy_templates_win = is_win
gen_policy_templates_linux = is_linux
gen_policy_templates_android = is_android
gen_policy_templates_mac = is_mac
+gen_policy_templates_chromeos = is_chromeos
+
+# The zip file is grabbed from the Windows build right now.
+gen_policy_templates_zip = is_win
+
+# Make sure all dependencies of the zip are built.
+if (gen_policy_templates_zip) {
+ gen_policy_templates_common = true
+ gen_policy_templates_win = true
+ gen_policy_templates_chromeos = true
+}
if (is_mac) {
import("//build/util/branding.gni")
@@ -237,6 +248,27 @@ action("policy_templates") {
]
}
}
+ if (gen_policy_templates_chromeos) {
+ outputs += policy_templates_chromeos_outputs
+ args += [
+ "--chromeos_adml",
+ rebase_path(policy_templates_chromeos_adml_path, root_build_dir),
+ "--chromeos_admx",
+ rebase_path(policy_templates_chromeos_admx_path, root_build_dir),
+ ]
+ if (is_chrome_branded) {
+ # Create 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.
+ outputs += policy_templates_chromeos_google_outputs
+ args += [
+ "--google_adml",
+ rebase_path(policy_templates_chromeos_google_adml_path, root_build_dir),
+ "--google_admx",
+ rebase_path(policy_templates_chromeos_google_admx_path, root_build_dir),
+ ]
+ }
+ }
}
# Run the proto compiler over the generated file and make it a component.
@@ -412,7 +444,7 @@ if (gen_policy_templates_android && is_android) {
}
}
-if (gen_policy_templates_common && gen_policy_templates_win) {
+if (gen_policy_templates_zip) {
version_path = "$policy_templates_base_dir/VERSION"
copy("add_version") {
@@ -428,7 +460,7 @@ if (gen_policy_templates_common && gen_policy_templates_win) {
output_zip_file = "$root_out_dir/policy_templates.zip"
script = "tools/make_policy_zip.py"
inputs = [ version_path ] + policy_templates_win_outputs +
- policy_templates_common_outputs
+ policy_templates_chromeos_outputs + policy_templates_common_outputs
outputs = [
output_zip_file,
]
@@ -451,14 +483,23 @@ if (gen_policy_templates_common && gen_policy_templates_win) {
rebase_path(policy_templates_win_adml_path, root_build_dir),
"--add",
rebase_path(policy_templates_win_admx_path, root_build_dir),
+ "--add",
+ rebase_path(policy_templates_chromeos_adml_path, root_build_dir),
+ "--add",
+ rebase_path(policy_templates_chromeos_admx_path, root_build_dir),
]
if (is_chrome_branded) {
inputs += policy_templates_win_google_outputs
+ inputs += policy_templates_chromeos_google_outputs
args += [
"--add",
rebase_path(policy_templates_win_google_adml_path, root_build_dir),
"--add",
rebase_path(policy_templates_win_google_admx_path, root_build_dir),
+ "--add",
+ rebase_path(policy_templates_chromeos_google_adml_path, root_build_dir),
+ "--add",
+ rebase_path(policy_templates_chromeos_google_admx_path, root_build_dir),
]
}
deps = [
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698