Index: chrome/browser/resources/safe_browsing/BUILD.gn |
diff --git a/chrome/browser/resources/safe_browsing/BUILD.gn b/chrome/browser/resources/safe_browsing/BUILD.gn |
index 679335803db461921aaf37f3607a53d0120c2b38..8193f993179a075ae425080bbda2733ace41247d 100644 |
--- a/chrome/browser/resources/safe_browsing/BUILD.gn |
+++ b/chrome/browser/resources/safe_browsing/BUILD.gn |
@@ -2,6 +2,8 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+# TODO(nparker): reduce the duplication between these two, somehow. |
+ |
# Generate the binary proto form of "file_types" from the ascii proto. |
action("make_file_types_protobuf") { |
script = "gen_file_type_proto.py" |
@@ -32,7 +34,6 @@ action("make_file_types_protobuf") { |
} |
inputs = [ |
- script, |
input_filename, |
] |
@@ -60,3 +61,42 @@ action("make_file_types_protobuf") { |
rebase_path(python_path_safe_browsing, root_build_dir), |
] |
} |
+ |
+# Generate the binary proto for ALL platforms. This is only run manually |
+# when pushing the files to GCS for the component-updater to pick up. |
+action("make_all_file_types_protobuf") { |
+ script = "gen_file_type_proto.py" |
+ |
+ input_filename = "download_file_types.asciipb" |
+ output_filename_pattern = "$target_gen_dir/all/%d/%s/download_file_types.pb" |
+ python_path_root = "$root_build_dir/pyproto" |
+ python_path_safe_browsing = "$python_path_root/chrome/common/safe_browsing" |
+ |
+ inputs = [ |
+ input_filename, |
+ ] |
+ |
+ # This script requires the generated python proto code |
+ deps = [ |
+ "//chrome/common/safe_browsing:proto", |
+ "//third_party/protobuf:py_proto", |
+ ] |
+ |
+ # A directory, since we can't derive the actual file names here. |
+ outputs = [ |
+ "$target_gen_dir/all", |
+ ] |
+ |
+ args = [ |
+ "-w", |
+ "-a", |
+ "-i", |
+ rebase_path(input_filename, root_build_dir), |
+ "-o", |
+ rebase_path(output_filename_pattern, root_build_dir), |
+ "-p", |
+ rebase_path(python_path_root, root_build_dir), |
+ "-p", |
+ rebase_path(python_path_safe_browsing, root_build_dir), |
+ ] |
+} |