Chromium Code Reviews| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 chrome_settings_proto_path = "$policy_gen_dir/chrome_settings.proto" | 60 chrome_settings_proto_path = "$policy_gen_dir/chrome_settings.proto" |
| 61 | 61 |
| 62 constants_header_path = "$policy_gen_dir/policy_constants.h" | 62 constants_header_path = "$policy_gen_dir/policy_constants.h" |
| 63 constants_source_path = "$policy_gen_dir/policy_constants.cc" | 63 constants_source_path = "$policy_gen_dir/policy_constants.cc" |
| 64 protobuf_decoder_path = "$policy_gen_dir/cloud_policy_generated.cc" | 64 protobuf_decoder_path = "$policy_gen_dir/cloud_policy_generated.cc" |
| 65 app_restrictions_path = | 65 app_restrictions_path = |
| 66 "$android_resources_gen_dir/xml-v21/app_restrictions.xml" | 66 "$android_resources_gen_dir/xml-v21/app_restrictions.xml" |
| 67 app_resources_path = | 67 app_resources_path = |
| 68 "$android_resources_gen_dir/values-v21/restriction_values.xml" | 68 "$android_resources_gen_dir/values-v21/restriction_values.xml" |
| 69 | 69 |
| 70 # Obtain Chromium version. | |
| 71 version_py_abspath = "//build/util/version.py" | |
| 72 chrome_version_abspath = "//chrome/VERSION" | |
| 73 chrome_version_path = rebase_path(chrome_version_abspath, root_build_dir) | |
| 74 version_full = exec_script(version_py_abspath, | |
| 75 [ | |
| 76 "-f", | |
| 77 chrome_version_path, | |
| 78 "-t @MAJOR@.@MINOR@.@BUILD@.@PATCH@", | |
| 79 ], | |
| 80 "trim string", | |
| 81 [ chrome_version_abspath ]) | |
|
Mattias Nissler (ping if slow)
2015/02/18 10:34:42
I have no idea where this came from, but I assume
Thiemo Nagel
2015/02/18 17:31:56
Done.
brettw
2015/02/23 19:19:07
I have tried very hard not to add this kind of thi
Thiemo Nagel
2015/04/22 17:26:47
Done.
| |
| 82 | |
| 70 action("cloud_policy_code_generate") { | 83 action("cloud_policy_code_generate") { |
| 71 script = "tools/generate_policy_source.py" | 84 script = "tools/generate_policy_source.py" |
| 72 | 85 |
| 73 if (is_chromeos) { | 86 if (is_chromeos) { |
| 74 chromeos_flag = "1" | 87 chromeos_flag = "1" |
| 75 } else { | 88 } else { |
| 76 chromeos_flag = "0" | 89 chromeos_flag = "0" |
| 77 } | 90 } |
| 78 | 91 |
| 79 inputs = [ | 92 inputs = [ |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 104 "--chrome-settings-protobuf=" + | 117 "--chrome-settings-protobuf=" + |
| 105 rebase_path(chrome_settings_proto_path, root_build_dir), | 118 rebase_path(chrome_settings_proto_path, root_build_dir), |
| 106 "--cloud-policy-protobuf=" + | 119 "--cloud-policy-protobuf=" + |
| 107 rebase_path(cloud_policy_proto_path, root_build_dir), | 120 rebase_path(cloud_policy_proto_path, root_build_dir), |
| 108 "--cloud-policy-decoder=" + | 121 "--cloud-policy-decoder=" + |
| 109 rebase_path(protobuf_decoder_path, root_build_dir), | 122 rebase_path(protobuf_decoder_path, root_build_dir), |
| 110 "--app-restrictions-definition=" + | 123 "--app-restrictions-definition=" + |
| 111 rebase_path(app_restrictions_path, root_build_dir), | 124 rebase_path(app_restrictions_path, root_build_dir), |
| 112 "--app-restrictions-resources=" + | 125 "--app-restrictions-resources=" + |
| 113 rebase_path(app_resources_path, root_build_dir), | 126 rebase_path(app_resources_path, root_build_dir), |
| 127 version_full, | |
| 114 os, | 128 os, |
| 115 chromeos_flag, | 129 chromeos_flag, |
| 116 rebase_path("resources/policy_templates.json", root_build_dir), | 130 rebase_path("resources/policy_templates.json", root_build_dir), |
| 117 ] | 131 ] |
| 118 } | 132 } |
| 119 | 133 |
| 120 proto_library("cloud_policy_proto_generated_compile") { | 134 proto_library("cloud_policy_proto_generated_compile") { |
| 121 sources = [ | 135 sources = [ |
| 122 cloud_policy_proto_path, | 136 cloud_policy_proto_path, |
| 123 ] | 137 ] |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 deps = [ | 226 deps = [ |
| 213 ":policy_component", | 227 ":policy_component", |
| 214 ":test_support", | 228 ":test_support", |
| 215 "//components/policy/proto", | 229 "//components/policy/proto", |
| 216 "//testing/gmock", | 230 "//testing/gmock", |
| 217 "//testing/gtest", | 231 "//testing/gtest", |
| 218 ] | 232 ] |
| 219 } | 233 } |
| 220 } | 234 } |
| 221 #TODO(GYP) policy templates, chrome_manifest_bundle | 235 #TODO(GYP) policy templates, chrome_manifest_bundle |
| OLD | NEW |