OLD | NEW |
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/features.gni") | 5 import("//build/config/features.gni") |
6 import("//third_party/protobuf/proto_library.gni") | 6 import("//third_party/protobuf/proto_library.gni") |
7 import("//tools/grit/grit_rule.gni") | 7 import("//tools/grit/grit_rule.gni") |
8 | 8 |
9 if (is_component_build) { | 9 if (is_component_build) { |
10 component("policy_component") { | 10 component("policy_component") { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 "--app-restrictions-definition=" + | 110 "--app-restrictions-definition=" + |
111 rebase_path(app_restrictions_path, root_build_dir), | 111 rebase_path(app_restrictions_path, root_build_dir), |
112 "--app-restrictions-resources=" + | 112 "--app-restrictions-resources=" + |
113 rebase_path(app_resources_path, root_build_dir), | 113 rebase_path(app_resources_path, root_build_dir), |
114 current_os, | 114 current_os, |
115 chromeos_flag, | 115 chromeos_flag, |
116 rebase_path("resources/policy_templates.json", root_build_dir), | 116 rebase_path("resources/policy_templates.json", root_build_dir), |
117 ] | 117 ] |
118 } | 118 } |
119 | 119 |
| 120 grit("policy_templates") { |
| 121 import("resources/policy_templates.gni") |
| 122 source = "resources/policy_templates.grd" |
| 123 use_qualified_include = true |
| 124 depend_on_stamp = true |
| 125 output_dir = "$root_gen_dir/chrome" |
| 126 outputs = policy_templates_doc_outputs |
| 127 if (is_android) { |
| 128 outputs += policy_templates_android_outputs |
| 129 } |
| 130 if (is_linux) { |
| 131 outputs += policy_templates_linux_outputs |
| 132 } |
| 133 if (is_mac) { |
| 134 outputs += policy_templates_mac_outputs |
| 135 |
| 136 # TODO(knn) : Move this out once more targets use this. |
| 137 if (is_chrome_branded) { |
| 138 mac_bundle_id = "com.google.Chrome" |
| 139 } else { |
| 140 mac_bundle_id = "org.chromium.Chromium" |
| 141 } |
| 142 defines = [ "mac_bundle_id=$mac_bundle_id" ] |
| 143 } |
| 144 if (is_win) { |
| 145 outputs += policy_templates_windows_outputs |
| 146 } |
| 147 } |
| 148 |
120 proto_library("cloud_policy_proto_generated_compile") { | 149 proto_library("cloud_policy_proto_generated_compile") { |
121 sources = [ | 150 sources = [ |
122 cloud_policy_proto_path, | 151 cloud_policy_proto_path, |
123 ] | 152 ] |
124 | 153 |
125 proto_out_dir = "policy/proto" | 154 proto_out_dir = "policy/proto" |
126 cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:" | 155 cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:" |
127 cc_include = "components/policy/policy_proto_export.h" | 156 cc_include = "components/policy/policy_proto_export.h" |
128 defines = [ "POLICY_PROTO_COMPILATION" ] | 157 defines = [ "POLICY_PROTO_COMPILATION" ] |
129 | 158 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 242 |
214 deps = [ | 243 deps = [ |
215 ":policy_component", | 244 ":policy_component", |
216 ":test_support", | 245 ":test_support", |
217 "//components/policy/proto", | 246 "//components/policy/proto", |
218 "//testing/gmock", | 247 "//testing/gmock", |
219 "//testing/gtest", | 248 "//testing/gtest", |
220 ] | 249 ] |
221 } | 250 } |
222 } | 251 } |
223 #TODO(GYP) policy templates, chrome_manifest_bundle | 252 #TODO(GYP) chrome_manifest_bundle |
OLD | NEW |