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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//build/toolchain/toolchain.gni") 7 import("//build/toolchain/toolchain.gni")
8 import("//components/policy/resources/policy_templates.gni") 8 import("//components/policy/resources/policy_templates.gni")
9 import("//third_party/protobuf/proto_library.gni") 9 import("//third_party/protobuf/proto_library.gni")
10 import("//tools/grit/grit_rule.gni") 10 import("//tools/grit/grit_rule.gni")
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 rebase_path(app_restrictions_path, root_build_dir), 104 rebase_path(app_restrictions_path, root_build_dir),
105 "--risk-tag-header=" + rebase_path(risk_tag_header_path, root_build_dir), 105 "--risk-tag-header=" + rebase_path(risk_tag_header_path, root_build_dir),
106 chrome_version_path, 106 chrome_version_path,
107 target_os, 107 target_os,
108 chromeos_flag, 108 chromeos_flag,
109 rebase_path("resources/policy_templates.json", root_build_dir), 109 rebase_path("resources/policy_templates.json", root_build_dir),
110 ] 110 ]
111 } 111 }
112 112
113 policy_templates_grd_file = "resources/policy_templates.grd" 113 policy_templates_grd_file = "resources/policy_templates.grd"
114
115 if (is_chrome_branded) {
116 # Creates google.admx and google.adml files that define a common 'Google'
117 # category used for Chrome, Chrome OS and possibly external tools, see
118 # crbug.com/665400.
119 action("create_google_admx") {
120 script = "tools/create_google_admx.py"
121 outputs = policy_templates_windows_google_outputs
122
123 # Don't pass in outputs directly, it would exceed a limit on Windows!
124 args = [
125 "--basedir",
126 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
127 "--grd_strip_path_prefix",
128 "app/policy/",
129 "--grd_input",
130 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.
131 "--grit_info",
132 rebase_path(grit_info_script, root_build_dir),
133 "-D",
134 "gen_policy_templates_win",
135 ] + grit_defines
136 }
137 }
138
114 grit("policy_templates") { 139 grit("policy_templates") {
115 source = policy_templates_grd_file 140 source = policy_templates_grd_file
116 use_qualified_include = true 141 use_qualified_include = true
117 output_dir = "$root_gen_dir/chrome" 142 output_dir = "$root_gen_dir/chrome"
118 outputs = [] 143 outputs = []
119 defines = [] 144 defines = []
120 145
121 if (gen_policy_templates_common) { 146 if (gen_policy_templates_common) {
122 outputs += policy_templates_doc_outputs 147 outputs += policy_templates_doc_outputs
123 defines += [ "gen_policy_templates_common" ] 148 defines += [ "gen_policy_templates_common" ]
(...skipping 10 matching lines...) Expand all
134 outputs += policy_templates_mac_outputs 159 outputs += policy_templates_mac_outputs
135 defines += [ 160 defines += [
136 "mac_bundle_id=$chrome_mac_bundle_id", 161 "mac_bundle_id=$chrome_mac_bundle_id",
137 "gen_policy_templates_mac", 162 "gen_policy_templates_mac",
138 ] 163 ]
139 } 164 }
140 if (gen_policy_templates_win) { 165 if (gen_policy_templates_win) {
141 outputs += policy_templates_windows_outputs 166 outputs += policy_templates_windows_outputs
142 defines += [ "gen_policy_templates_win" ] 167 defines += [ "gen_policy_templates_win" ]
143 } 168 }
169 if (is_chrome_branded) {
170 deps = [
171 ":create_google_admx",
172 ]
173 }
144 } 174 }
145 175
146 # Run the proto compiler over the generated file and make it a component. 176 # Run the proto compiler over the generated file and make it a component.
147 component("cloud_policy_proto_generated_compile") { 177 component("cloud_policy_proto_generated_compile") {
148 public_deps = [ 178 public_deps = [
149 ":cloud_policy_proto_generated_compile_proto", 179 ":cloud_policy_proto_generated_compile_proto",
150 ] 180 ]
151 } 181 }
152 proto_library("cloud_policy_proto_generated_compile_proto") { 182 proto_library("cloud_policy_proto_generated_compile_proto") {
153 visibility = [ ":cloud_policy_proto_generated_compile" ] 183 visibility = [ ":cloud_policy_proto_generated_compile" ]
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 rebase_path(grit_info_script, root_build_dir), 368 rebase_path(grit_info_script, root_build_dir),
339 "-D", 369 "-D",
340 "gen_policy_templates_common", 370 "gen_policy_templates_common",
341 "-D", 371 "-D",
342 "gen_policy_templates_win", 372 "gen_policy_templates_win",
343 ] + grit_defines 373 ] + grit_defines
344 deps = [ 374 deps = [
345 ":add_version", 375 ":add_version",
346 ":policy_templates", 376 ":policy_templates",
347 ] 377 ]
378 if (is_chrome_branded) {
379 inputs += policy_templates_windows_google_outputs
380 deps += [ ":create_google_admx" ]
381 args += [ "--include_google_admx" ]
382 }
348 } 383 }
349 } 384 }
350 } 385 }
OLDNEW
« 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