Chromium Code Reviews| Index: chrome/android/BUILD.gn |
| diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn |
| index 9bdf03faec931bd9c0bba129bc6250ec30f09a36..855134136205945a7a66bcbf9934f8144c09b576 100644 |
| --- a/chrome/android/BUILD.gn |
| +++ b/chrome/android/BUILD.gn |
| @@ -41,6 +41,10 @@ app_hooks_impl = "java/src/org/chromium/chrome/browser/AppHooksImpl.java" |
| if (enable_resource_whitelist_generation) { |
| monochrome_resource_whitelist = |
| "$target_gen_dir/monochrome_resource_whitelist.txt" |
| + system_webview_locale_resource_id_list = |
| + "$target_gen_dir/system_webview_locale_resource_id_list.txt" |
| + monochrome_locale_whitelist = |
| + "$target_gen_dir/monochrome_locale_whitelist.txt" |
| } |
| jinja_template("chrome_public_android_manifest") { |
| @@ -730,9 +734,62 @@ if (current_toolchain == default_toolchain) { |
| "/libmonochrome$shlib_extension.whitelist" |
| output = monochrome_resource_whitelist |
| } |
| + |
| + action("system_webview_locale_resource_id_list") { |
| + script = "//tools/grit/pak_util.py" |
|
agrieve
2017/07/17 13:50:52
Would be good to add a comment to this explicitly
F
2017/07/17 14:35:14
Done.
|
| + |
| + _system_webview_en_US_locale_pak = |
| + "$root_out_dir/android_webview/locales/en-US.pak" |
| + |
| + inputs = [ |
| + _system_webview_en_US_locale_pak, |
| + ] |
| + |
| + outputs = [ |
| + system_webview_locale_resource_id_list, |
| + ] |
| + |
| + deps = [ |
| + "//android_webview:repack_locales", |
| + ] |
| + |
| + args = [ |
| + "list", |
| + "--output", |
| + rebase_path(system_webview_locale_resource_id_list, root_build_dir), |
| + rebase_path(_system_webview_en_US_locale_pak, root_build_dir), |
| + ] |
| + } |
| + |
| + action("monochrome_locale_whitelist") { |
| + script = "//tools/resources/filter_resource_whitelist.py" |
| + |
| + inputs = [ |
| + monochrome_resource_whitelist, |
| + system_webview_locale_resource_id_list, |
| + ] |
| + |
| + outputs = [ |
| + monochrome_locale_whitelist, |
| + ] |
| + |
| + deps = [ |
| + ":monochrome_resource_whitelist", |
| + ":system_webview_locale_resource_id_list", |
| + "//android_webview:system_webview_pak_whitelist", |
| + ] |
| + |
| + args = [ |
| + "--input", |
| + rebase_path(monochrome_resource_whitelist, root_build_dir), |
| + "--filter", |
| + rebase_path(system_webview_locale_resource_id_list, root_build_dir), |
| + "--output", |
| + rebase_path(monochrome_locale_whitelist, root_build_dir), |
| + ] |
| + } |
| } |
| - # This target does not output locale paks. |
| chrome_paks("monochrome_paks") { |
| output_dir = "$target_gen_dir/$target_name" |
| @@ -741,12 +798,25 @@ if (current_toolchain == default_toolchain) { |
| "//android_webview:generate_aw_resources", |
| ] |
| - exclude_locale_paks = true |
| - |
| if (enable_resource_whitelist_generation) { |
| repack_whitelist = monochrome_resource_whitelist |
| deps += [ ":monochrome_resource_whitelist" ] |
| + locale_whitelist = monochrome_locale_whitelist |
| + deps += [ ":monochrome_locale_whitelist" ] |
| + } |
| + } |
| + |
| + # This target is separate from monochrome_pak_assets because it does not |
| + # disable compression. |
| + android_assets("monochrome_locale_pak_assets") { |
| + sources = [] |
| + foreach(_locale, locales - android_chrome_omitted_locales) { |
| + sources += [ "$target_gen_dir/monochrome_paks/locales/$_locale.pak" ] |
| } |
| + |
| + deps = [ |
| + ":monochrome_paks", |
| + ] |
| } |
| # This target explicitly includes locale paks via deps. |
| @@ -758,7 +828,7 @@ if (current_toolchain == default_toolchain) { |
| disable_compression = true |
| deps = [ |
| - ":chrome_public_locale_pak_assets", |
| + ":monochrome_locale_pak_assets", |
| ":monochrome_paks", |
| "//android_webview:locale_pak_assets", |
| ] |