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

Unified Diff: chrome/chrome_resources.gyp

Issue 1917653002: Re-Re-land: Add download_file_types.proto with ascii->binary conversion, as a resource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a wrapper to change python args, for GYP and GN Created 4 years, 8 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
Index: chrome/chrome_resources.gyp
diff --git a/chrome/chrome_resources.gyp b/chrome/chrome_resources.gyp
index dc41d4188ece31b00ab279ddb0a0257cd179feb7..531ca6721b2c96e8342ec730e0c08f952bd5b883 100644
--- a/chrome/chrome_resources.gyp
+++ b/chrome/chrome_resources.gyp
@@ -222,6 +222,9 @@
}
],
}],
+ ['OS != "android" and OS != "ios"', {
+ 'dependencies': [ 'make_file_types_protobuf' ]
+ }],
],
'includes': [ '../build/grit_target.gypi' ],
},
@@ -293,6 +296,45 @@
},
],
},
+
+ {
+ # GN version: //chrome/browser/resources/safe_browsing:make_file_types_protobuf
+ # Convert the ascii proto file to a binary resource.
+ 'target_name': 'make_file_types_protobuf',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'chrome.gyp:safe_browsing_proto',
+ '<(DEPTH)/third_party/protobuf/protobuf.gyp:py_proto',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'generate_file_types_protobuf',
+ 'variables' : {
+ 'script_file':'browser/resources/safe_browsing/gen_file_type_proto.py',
+ 'asciipb_file' : 'browser/resources/safe_browsing/download_file_types.asciipb',
+ 'output_file' : '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/safe_browsing/download_file_types.pb',
+ },
+ 'inputs': [
+ '<(script_file)',
+ '<(asciipb_file)',
+ ],
+ 'outputs': [
+ '<(output_file)',
+ ],
+ 'action': [
+ 'python',
+ '<(script_file)',
+ '-w',
+ '-i', '<(asciipb_file)',
+ '-o', '<(output_file)',
+ '-p', '<(PRODUCT_DIR)/pyproto',
+ '-p', '<(PRODUCT_DIR)/pyproto/chrome/common/safe_browsing',
+ ],
+ 'message': 'Generating download_file_types.pb.',
+ }
+ ],
+ },
{
# GN version: //chrome/browser/metrics/variations:chrome_ui_string_overrider_factory_gen_sources
'target_name': 'make_chrome_ui_string_overrider_factory',

Powered by Google App Engine
This is Rietveld 408576698